[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Parser tools: How to make the lexer context sensitive?



Flatt writes

| If I remember correctly, the standard solution is to have a 
| table of `typedef'ed names. When the parser encounters a typedef, 
| it puts the type name into the table. So the test above would 
| be "is (get-lexeme) in the table?".

This works. 


| At Wed, 27 Mar 2002 13:21:02 -0700 (MST), Scott Owens wrote:
| > Currently there is no way for the lexer to get useful information 
| > about the state of the parser.

| To be clear, I'm not arguing with Scott's claim above, but I'm saying 
| that the information to send from the parser to the 
| lexer is not really something about the current state of ther parser, 
| but about a history of typedefs previously seen by 
| the parser.

This perspective helped.

Thanks goes to Matthew and Scott.

/ Jens Axel