Add support for version numbers.

Allow CRLF as a line terminator (as well as plain LF)

llvm-svn: 15993
This commit is contained in:
Reid Spencer 2004-08-22 18:02:13 +00:00
parent ed09afc536
commit a318822db2
1 changed files with 5 additions and 3 deletions

View File

@ -78,10 +78,10 @@ inline llvm::ConfigLexerTokens handleBoolean(llvm::ConfigLexerTokens token) {
ASSEMBLER assembler|Assembler|ASSEMBLER ASSEMBLER assembler|Assembler|ASSEMBLER
BadSubst \%[^iots][a-zA-Z]\% BadSubst \%[^iots][a-zA-Z]\%
COMMAND command|Command|COMMAND COMMAND command|Command|COMMAND
Comment \#[^\n]*\n Comment \#[^\r\n]*\r?\n
NewLine \n NewLine \r?\n
Eq \= Eq \=
EscNewLine \\\n EscNewLine \\\r?\n
GROKS_DASH_O groks_dash_O|Groks_Dash_O|GROKS_DASH_O GROKS_DASH_O groks_dash_O|Groks_Dash_O|GROKS_DASH_O
LANG lang|Lang|LANG LANG lang|Lang|LANG
LINKER linker|Linker|LINKER LINKER linker|Linker|LINKER
@ -102,6 +102,7 @@ Sep \.
String \"[^\"]*\" String \"[^\"]*\"
TRANSLATES translates|Translates|TRANSLATES TRANSLATES translates|Translates|TRANSLATES
TRANSLATOR translator|Translator|TRANSLATOR TRANSLATOR translator|Translator|TRANSLATOR
VERSION version|Version|VERSION
White [ \t]* White [ \t]*
True true|True|TRUE True true|True|TRUE
@ -153,6 +154,7 @@ No no|No|NO
{OPT3} { return handleContext("opt3",OPT3); } {OPT3} { return handleContext("opt3",OPT3); }
{OPT4} { return handleContext("opt4",OPT4); } {OPT4} { return handleContext("opt4",OPT4); }
{OPT5} { return handleContext("opt5",OPT5); } {OPT5} { return handleContext("opt5",OPT5); }
{VERSION} { return handleContext("version",VERSION); }
%in% { return handleSubstitution(IN_SUBST); } %in% { return handleSubstitution(IN_SUBST); }
%out% { return handleSubstitution(OUT_SUBST); } %out% { return handleSubstitution(OUT_SUBST); }