I'm having what appears to be an ambiguous grammar. It seems like there are some problems under FileText since there is no conflict when I run only the top part (above FileText). Can anyone help me to spot where my issue is? I believe my tree looks fine. Here's an input sample:
lemon AND (#Chapter1.Title : "BNF grammar" AND #Chapter10.Title : ("BNF notion" OR "EBNF notion"))
error:
QUOT shift 17
QUOT reduce 14 ** Parsing conflict **
STR shift-reduce 20 subval ::= STR
STR reduce 14 ** Parsing conflict **
LPAR shift 7
LPAR reduce 14 ** Parsing conflict **
WS shift-reduce 10 space ::= WS
WS reduce 14 ** Parsing conflict **
op shift 9
space shift 12
text shift-reduce 15 filetext::= filetext text
subvalue shift-reduce 15 filetext::= filetext text /*because subval==text
{default} reduce 14 location ::= location COLON filetext
grammar:
%left::=AND.
%left::=OR.
book::= expr.
expr::= expr term.
expr::= expr op term.
expr::= term.
term::= value.
term::= QUOT STR QUOT.
value::= atom.
value::= LPAR expr RPAR.
atom::= STR.
atom::= file.
op::= space AND space.
op::= space OR space.
space::= WS.
space::= space WS.
file::= location COLON filetext.
location::= SHARP STR PERIOD STR.
filetext::= filetext text.
filetext::= filetext op text.
filetext::= text.
text::= subvalue.
text::= QUOT STR QUOT.
subvalue::= subatom.
subvalue::= LPAR filetext RPAR.
subatom::= STR.
For what is worth, the tree came up with and derived my grammar from: