I am encountering a shift/reduce conflict inside this trivial Regular Expression parser. I am a beginner in yacc and I seem to be a little confused. Here is what I have written so far:
%token ID
%%
exp: ID { $$ = new YYRegExParserVal(this._createObjectForID($1.ival)); }
| exp exp { $$ = new YYRegExParserVal(this._createObjectForConcat($1.obj, $2.obj)); }
;
%%
The name of my parser class is YYRegExParser
and right now it should be recognizing only simple ID's (alphanumeric symbols) and concatenation between two regular expressions. However, the second rule never gets matched even though my input is correct