Adela Vais - SAOC Milestone 3 Update 2 - Dlang GLR Parser for GNU Bison

Adela Vais adela.vais99 at gmail.com
Thu Dec 10 23:44:13 UTC 2020


On Wednesday, 2 December 2020 at 00:36:20 UTC, Adela Vais wrote:
>>>[...]

Hello!

As of last week:
- As libint.h is not a standard C header, it can't be added to 
druntime, so I will not be pursuing my PR[1] anymore. I started 
working on a dub package [2] instead.
- I fixed my setup and now internationalisation works as expected 
on my system. I sent a patch [3] and, after review, I need to 
make some changes before it is accepted.
- I started working on some old fixes that were requested [4]: 
style fixes in LALR1 and the documentation, creating an alias for 
the return value of yylex (now YYParser.Symbol can be referred to 
as Symbol) and reducing the verbosity of handling the location 
reporting in the examples and tests.
- The Lexer's return value is the Symbol struct. It receives the 
external token (TokenKind) and transforms it to its internal form 
(SymbolKind), saving only the latter. The parser had 2 variables, 
for both forms. I removed the variable for the external token 
[4], as there was no use for it anymore.

The plan for next week:
- From now until the end of #SAOC2020 I will work in parallel on 
the GLR and the remaining tasks from the LALR1, as the user 
interface (which is the same for both parsers) is almost finished.
- I will start working on the GLR, first by analyzing the already 
existing GLRs (in C and C++) and writing programs that would help 
me understand the differences between them and LALR1.
- I will add type aliases for a few internal types. The 
documentation specifies that the user should not use objects for 
which the name starts with "YY", as they are internal 
implementation details, and the examples use such objects/types 
(struct YYLocation, for example), which should be available for 
the user.

[1]: https://github.com/dlang/druntime/pull/3300
[2]: https://github.com/adelavais/libint
[3]: 
https://github.com/adelavais/bison/tree/internationalisation-squash
[4]: 
https://github.com/adelavais/bison/tree/fixes-from-changing-yylex-retval


More information about the Digitalmars-d mailing list