|How to parse C-programs without communication between parser and lexer firstname.lastname@example.org (Detlef Sodtke) (1996-08-15)|
|Re: How to parse C-programs without communication between parser and l email@example.com (Henry Spencer) (1996-08-16)|
|Re: How to parse C-programs without communication between parser and l firstname.lastname@example.org (Scott Stanchfield) (1996-08-19)|
|How to parse C-programs without communication between parser and lexer email@example.com (Ilfak Guilfanov) (1996-08-27)|
|From:||Detlef Sodtke <firstname.lastname@example.org>|
|Date:||15 Aug 1996 17:38:32 -0400|
|Organization:||TU Braunschweig, Informatik (Bueltenweg), Germany|
|Keywords:||C, parse, question, comment|
could anybody suggest books/papers/help about how to parse C-programs
without communication between the parser and the lexer.
The main problem is to distinguish the typedefnames from the normal
identifiers. The common way is, that the parser writes in a hashtable the
typedefnames and the lexer reads from it.
In our implementation we can't do it this way. We have to lex the whole
C-program before the parser starts to work. So the parser is not able to
write in a hashtable.
Does anybody know something that could help?
[You really can't tell the difference between a typedef type name and a
variable name without some parser feedback, so I'd suggest that you make
your lexer treat any unrecognized word as a symbol and in your parser
fiddle with the syntax so that it can accept a symbol in the type position
and throw out the mistakes that accepts semantically. -John]
Return to the
Search the comp.compilers archives again.