[fpc-pascal] machine readable grammar of object pascal?
    Michael Van Canneyt 
    michael at freepascal.org
       
    Wed May  3 11:37:11 CEST 2017
    
    
  
On Wed, 3 May 2017, denisgolovan wrote:
>> On 2017-05-03 00:53, Marc Santhoff wrote:
>>>  Does such grammar exist?
>
> Well, it depends on what you are trying to solve.
> If you want to parse Pascal using FPC - that's one way. 
> If you want to get some king of AST using any available [command-line] tools - that's another one.
>
> Talking about latter - I would take LPEG (Lua+PEG) and create a parser myself. 
> It comes quite simple and intuitive (contrary to LL,LR,LALR,...).
> Most of Object Pascal is done right (minus sets/open arrays),
Add generics to the 'minus' list.
Michael.
    
    
More information about the fpc-pascal
mailing list