10206 productions re-write

Peter peter at pblackman.plus.com
Fri Feb 24 13:45:34 CET 2017


On 23/02/17 18:53, Paul Isaacs wrote:
> 
> 
> On 23/02/17 06:26 AM, Bastiaan Veelo wrote:
>> […] Maybe, but I can’t see how… But why rewrite at this point? For
>> performance? Best, Bastiaan. 
> 
> Hello Bastiaan,
> 
> Thanks for the reply.
> 
> I think that variable-access is left recursive. Therefore, with a
> recursive descent parser, I have to rewrite.
> 
> It looks like the basic form of varaible-access is:
> 
> identifier { suffix } where suffix varies for record/array/dereference
> and doesn't exist for entire variable.
> 
> Regards,
> 
> Paul
> 
> 
> _______________________________________________
> Gpc mailing list
> Gpc at gnu.de
> https://www.g-n-u.de/mailman/listinfo/gpc


Hi Paul,

Here is a link to a Pascal recursive decent parser.
It seems to handle basic variable access OK.

Regards,
Peter

https://github.com/tangentstorm/pascal/blob/master/super/parse.p




More information about the Gpc mailing list