Add support for version numbers.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15993 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-08-22 18:02:13 +00:00
parent b50acbcf49
commit 1df71210fe

View File

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