[jflex-users] Syntax error for a regex rule
The fast lexer generator for Java
Brought to you by:
lsf37,
steve_rowe
From: Denis W. <ddw...@gm...> - 2009-11-29 14:21:47
|
Hi folks, I'm new to JFlex and regex. I get a syntax error when generate using .flex file. My .flex is sm thing like as follows. %% VALUE = '"' ([^<&"] | [0-9])* '"' | "'" ([^<&'] | [0-9])* "'" %% {VALUE} { return symbol(sym.VALUE); } I get an error message as follows. Reading "/home/hdd2/Acedemic/L4-S1/CS4410-CompTheory/project/Tokenizer.flex" Error in file "/home/hdd2/Acedemic/L4-S1/CS4410-CompTheory/project/Tokenizer.flex" (line 54): Syntax error. VALUE = '"' ([^<&"] | [0-9])* '"' | "'" ([^<&'] | [0-9])* "'" ^ Error in file "/home/hdd2/Acedemic/L4-S1/CS4410-CompTheory/project/Tokenizer.flex" (line 54): Unterminated string at end of line. VALUE = '"' ([^<&"] | [0-9])* '"' | "'" ([^<&'] | [0-9])* "'" ^ 2 errors, 0 warnings. Generation aborted. Can anyone give me a clue to solve this? Best, Dhananjaya. |