Closed walter-weinmann closed 7 years ago
@walter-weinmann Thanks for reporting this. So the problem is that these rules occur with the same definitions in multiple places? Do you think that simply refactoring them to their own rules and referencing that rule in the current places would be enough?
EDIT: On second thought, that doesn't seem like a solution at all to your second headline. I don't think I quite understand what the problem is. Is it because (to take one example) Properties
and Literal
are both valid in some position, and they both expand to a matching rule (MapLiteral
) which causes an ambiguity?
@Mats-SX My problem is that I'm using a LALR parser, namely yecc, which is the Erlang foe to yacc. LALR parsers are however bottom up parsers with only limited lookahead.
@walter-weinmann I don't think I understand exactly what the problem is, so I don't know how to solve it. Your first headline reads 'unused rules', but I don't understand in what sense they are unused? It's certainly possible to write a query which will use any or both of these rules.
Do you have a particular query that is impossible to parse?
For ALL
, I think that's a bug and should be removed. ALL
is reserved, and not allowed as a symbolic name (pushed a fix).
I have checked the current status of the grammar definition (EBNF version as of June 21, 2017) with the BNF Converter. The following issues were discovered:
Unused rules:
RelationshipsPattern = NodePattern, { [SP], PatternElementChain }- ;
ReservedWord = (A,L,L) | ...
SymbolicName = ... | (A,L,L) | ...
Properties = MapLiteral | ...
Literal = ... | MapLiteral | ...
Properties = ... | Parameter ;
Atom = .. | Parameter | ...