Re: 10206 lexical ambiguity

Paul Isaacs <[email protected]> Fri, 20 Jan 2017 11:14:08 -0500
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
Waldek,Thanks for the outstanding explanation - particularly the 
significance of the distinction between LL and LR parsing. I have never 
seen such a clear explanation before. After about 3 reads I understood 
the whole thing.

I arbitrarily distinguish lexical tokens as a separate entity because 
tokens like := need character lookahead at what I term the lexical 
level. At the "tokens" level, tokens lookahead is needed.

The new-ordinal-type production can be resolved if the LL parser has 
access to an identifiers symbol table. The first identifier of the 
enumeration will always be undefined. Any subrange identifier must have 
been defined previously.

I have not noticed any direct left recursion in the 10206 grammar. I 
will hope that there are indirect LL recursion traps awaiting.

I will proceed with the assumptions that identifier type information 
will be similarly useful in other cases and that determining the "type" 
of an identifier will never be ambiguous in an LL sense.

Thank you for taking the time to write such a comprehensive reply.

Regards,

Paul


_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc