Related articles |
---|
lex error "Compiler Design and Construction" rdfloyd@ceaport.UUCP (1990-08-09) |
Re: lex error "Compiler Design and Construction" vern@cs.cornell.edu (1990-08-13) |
Newsgroups: | comp.unix.questions,comp.compilers |
From: | rdfloyd@ceaport.UUCP (Randy Floyd) |
Followup-To: | comp.unix.questions |
Keywords: | C,lex,question |
Organization: | C Tech, Memphis, TN |
Distribution: | usa |
Date: | Thu, 09 Aug 90 19:05:42 GMT |
In "Compiler Design and Construction" by: Authur B. Pyster (second edition)
On page 67 there is a small lex for part of C syntax but when I try to run
it through FLEX I get an error.
Syntax error at line 38: bad iteration values
the definition of char and line 38 follow:
char \'([^'\n]|\\[ntrbrf'\n]|\\0[0-7]{0,2})+\'
line 38:
{char} return token(CHARLIT);
now!!!
Can a kind soul please give me a rundown of the definition line
for char and tell me why I might be getting this message.
BTW: I am new to lex/yacc but learning.
thanks for any help!!
rdfloyd@ceaport
[This is a pretty gross way to define a character constant, but I don't
see anything obviously wrong with it, other than that it matches things
like '\000' ambiguously. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.