The parser is complete except the handling of ambiguities. But it is just that: a parser. The output is an AST.
I have meant to submit the grammar as an example to Pegged [1], I’ll see if I can find some time for that, together with an example parser.
Bastiaan.
[1] https://github.com/PhilippeSigaud/Pegged
On 15 Feb 2017, at 21:20, John L. Ries jries@salford-systems.com wrote:
I'm not at all sure we really want a trilingual compiler, but the parser is complete or nearly so, it's probably worth a look.
--------------------------| John L. Ries | Salford Systems | Phone: (619)543-8880 x107 | or (435)867-8885 | --------------------------|
On Wed, 15 Feb 2017, Bastiaan Veelo wrote:
I wrote a recursive descent parser for Extended Pascal in the D language using the Pegged library, which takes the rules of the standard almost literally. I remember changing the order of options in some rules, but I am unsure whether that was for efficiency or for giving precedence to common constructs. I do remember seeing ambiguities in variable access and function access, which I imagine can be resolved by keeping a symbol table of earlier definitions.
My parser is an interesting project but turned out to be rather inefficient at the moment. If there is an interest I will consider to put it online.
Bastiaan.