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

Adela Vais adela.vais99 at gmail.com
Tue Dec 22 21:12:02 UTC 2020


On Friday, 18 December 2020 at 21:03:51 UTC, Adela Vais wrote:
>>>>>[...]

Hello!

As of the last update:
- I added version identifiers for running the 
internationalization code. As the D backend uses functions from 
libintl.h, which is a non-standard C header, the behavior of 
Bison cannot be to use it by default; the user is able to choose 
whether they install its prerequisites or not. [1]
- I created a dub package [2] for an easier import of the 
libintl.h functions in Bison and other projects. I also closed 
the PR [3] from druntime.
- All the patches from last week were accepted, and I submitted 3 
additional ones:
     * I removed the getter methods for the semantic value and 
positions from the Lexer interface, now unnecessary because of 
the complete symbol approach [4];
     * I modified the backend to use all throughout the aliases 
for location, position, and semantic value [5];
     * I removed a comparison inside the parser(), unnecessary 
after I removed the variable for the external token from this 
method [6].

The plan for next week:
- I will use the libintl dub with Bison.
- I will modify the error parsing by eliminating "verbose", a 
backward compatibility option not needed in D. At the moment, 
"verbose" and "detailed" options generate the same code. With 
this change, I will also restructure the way the SymbolKind (the 
internal types) names are handled when generating the error 
messages.
- Continue working on the push parser.

During the next milestone of #SAOC2020 I decided will focus on 
writing the last remaining parts of the LALR1, and postponing the 
work on the GLR. While I will not make significant progress on 
the GLR itself, the 2 parsers share the same user interface, so a 
lot of my work on the LALR1 will be translated into the GLR.

[1]: https://github.com/adelavais/bison/commits/fix-i18n
[2]: https://code.dlang.org/packages/libintl
[3]: https://github.com/dlang/druntime/pull/3300
[4]: 
https://github.com/akimd/bison/commit/32bb53870bb9caa2f8de081fdb53cb3540c8ce7a
[5]: 
https://github.com/akimd/bison/commit/27109d9d4ac11665612119344141df0b9f440fbb
[6]: 
https://github.com/akimd/bison/commit/2b4451c4afb8ed90795f8bb7b198996143d769c9



More information about the Digitalmars-d mailing list