Open mingodad opened 10 months ago
Very very cool!!! Thank you. This looks like a lot of work and it's much appreciated.
I was able to use your tool to play around and find a fix that reduce/reduce. Just need to update my code...
For feedback, I would say better parse error messages would be appreciated. Right now the bottom right window goes blank. Would be nice to know how far it made it, a stack of productions, and maybe expected tokens.
I would also appreciate that full conflict report you put in this issue onto the app itself. I stick at fixing conflicts and need all the help I can get!
I'm sure it's asking a BIT too much, but it would be fun if you could translate the conflict examples into real examples by substituting some synthetic data for the tokens. I realize I'm being lazy here, but it would be a super cool party trick to get real example texts when there is an error.
For my own notes, I should remove ctor_identifier_list
all together and simply allow function definitions without types:
translation_unit :
external_declaration
| translation_unit external_declaration
;
external_declaration :
function_definition
| declaration
| ';'
;
function_definition :
declaration_specifiers declarator declaration_list compound_statement
| declaration_specifiers declarator compound_statement
| declarator compound_statement
;
declaration_list :
declaration
| preproc declaration
| declaration_list declaration
;
I've just added this project grammar to https://mingodad.github.io/parsertl-playground/playground/ an
Yacc/Lex
compatible online editor/tester (selectCLanguage parser
fromExamples
then clickParse
to see the parser tree for the content inInput source
).Any feedback is welcome !
This grammar has one
reduce/reduce
conflict that will prevent the execution ofctor_identifier_list
production: