It may be easier if I just give you a chunk of my grammar, the code is somewhat long.
Just say if you still need some of the code. (E is empty in the below grammar)
Code:
expression = id '=' expression | condition
condition = and ('||' and)*
and = equal ('&&' equal)*
equal = relation ('==' relation | E)
relation = sum (('>' | '<') sum | E)
sum = term (('+' | '-') term)*
term = unary (('*' | '/' | '%') unary)*
unary = atom | ('!' | '-') unary
atom = int | float | id | '(' expression ')'
So if I'm parsing:
q = i+j*+k
I see the * and call unary, I get down to atom and see I have none of int, float, id, '(' so I error, but then do I just eat tokens till I get one of Follow(atom) and the problem is solved?