Skip to content

Grammar conflicts #48

@mingodad

Description

@mingodad

I've just added mango.[yl] to https://mingodad.github.io/parsertl-playground/playground/ an Yacc/Lex compatible online editor/tester (select MangoFix parser from Examples then click Parse to see a parser tree for the content in Input source editor).

I fixed some conflicts there see definition, annotation_list, annotation_list_opt, declare_struct ... , but still there is some conflicts:

state 48 SHIFT (type_specifier -> IDENTIFIER . ASTERISK)/REDUCE (primary_expression -> IDENTIFIER) conflict.
state 192 SHIFT (type_specifier -> IDENTIFIER . ASTERISK)/REDUCE (primary_expression -> IDENTIFIER) conflict.
state 234:COLON REDUCE (selector_1 -> IDENTIFIER)/REDUCE (primary_expression -> primary_expression DOT IDENTIFIER) conflict.
state 234:LP REDUCE (selector_1 -> IDENTIFIER)/REDUCE (primary_expression -> primary_expression DOT IDENTIFIER) conflict.
state 235:COLON REDUCE (selector_1 -> key_work_identifier)/REDUCE (primary_expression -> primary_expression DOT key_work_identifier) conflict.
state 235:LP REDUCE (selector_1 -> key_work_identifier)/REDUCE (primary_expression -> primary_expression DOT key_work_identifier) conflict.

The rule primary_expression is too broad and as it's now accept things like:

    12("str");
    "str"(23.5);
    nil("str");
    NULL("str");

I hope https://mingodad.github.io/parsertl-playground/playground/ can help debug/develop/test/document this project grammar.

The repository is here https://github.com/mingodad/parsertl-playground .

Any feedback is welcome !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions