[llvm-commits] CVS: llvm/tools/llvmc/ConfigLexer.l
Reid Spencer
reid at x10sys.com
Tue Nov 23 15:35:26 PST 2004
Changes in directory llvm/tools/llvmc:
ConfigLexer.l updated: 1.10 -> 1.11
---
Log message:
Handle space, separators, bad substitutions, and library search path better
than before.
---
Diffs of the changes: (+7 -6)
Index: llvm/tools/llvmc/ConfigLexer.l
diff -u llvm/tools/llvmc/ConfigLexer.l:1.10 llvm/tools/llvmc/ConfigLexer.l:1.11
--- llvm/tools/llvmc/ConfigLexer.l:1.10 Wed Oct 27 23:04:38 2004
+++ llvm/tools/llvmc/ConfigLexer.l Tue Nov 23 17:35:16 2004
@@ -79,6 +79,7 @@
ASSEMBLER assembler|Assembler|ASSEMBLER
COMMAND command|Command|COMMAND
LANG lang|Lang|LANG
+LIBS libs|Libs|LIBS
LINKER linker|Linker|LINKER
NAME name|Name|NAME
OPT1 opt1|Opt1|OPT1
@@ -100,7 +101,7 @@
Bytecode bc|BC|bytecode|Bytecode|BYTECODE
Assembly asm|ASM|assembly|Assembly|ASSEMBLY
-BadSubst \%[^iots][a-zA-Z]\%
+BadSubst \%[a-zA-Z]*\%
Comment \#[^\r\n]*\r?\n
NewLine \r?\n
Eq \=
@@ -113,7 +114,7 @@
%%
-{White} { /* Ignore whitespace */ }
+{White} { if (ConfigLexerState.in_value) return SPACE; }
{Comment} { /* Ignore comments */
ConfigLexerState.in_value = false;
@@ -134,9 +135,12 @@
return EQUALS;
}
+{Sep} { return SEPARATOR; }
+
{VERSION} { return handleNameContext(VERSION_TOK); }
{LANG} { return handleNameContext(LANG); }
+{LIBS} { return handleNameContext(LIBS); }
{NAME} { return handleNameContext(NAME); }
{OPT1} { return handleNameContext(OPT1); }
{OPT2} { return handleNameContext(OPT2); }
@@ -173,7 +177,6 @@
%fOpts% { return handleSubstitution(FOPTS_SUBST); }
%MOpts% { return handleSubstitution(MOPTS_SUBST); }
%WOpts% { return handleSubstitution(WOPTS_SUBST); }
-{BadSubst} { YY_FATAL_ERROR("Invalid substitution token"); }
{Assembly} { return handleValueContext(ASSEMBLY); }
{Bytecode} { return handleValueContext(BYTECODE); }
@@ -186,8 +189,6 @@
--ConfigLexerState.StringVal.end());
return STRING;
}
-{Sep} { if (ConfigLexerState.in_value) { ConfigLexerState.StringVal = yytext;
- return OPTION; } }
-
+{BadSubst} { YY_FATAL_ERROR("Invalid substitution token"); }
%%
More information about the llvm-commits
mailing list