Related articles |
---|
Flex regular expression problems kpetrov@jagor.srce.hr (1999-04-09) |
From: | kpetrov@jagor.srce.hr (Omadon) |
Newsgroups: | comp.compilers |
Date: | 9 Apr 1999 14:08:17 -0400 |
Organization: | FER |
Keywords: | lex, question |
I'm having problems defining a flex regular expression for line numbers for
a BASIC-like language.
I define the reg. expression for line numbers:
^[[:space:]]*[0-9]+ { out_word("LINENUM"); }
This works when the line number is at the beginning of the text line, but
if I have some spaces before the line number the lexer jams.
10 for blah blah <- this works
10 for blah... <- this jams the scanner
HELP!!!
Return to the
comp.compilers page.
Search the
comp.compilers archives again.