David PONCE <david.ponce@...> writes:
> Hi Joseph,
>> I'm resolving conflicts in my grammar. One of them is of the form:
>> state 147
>> typeexpr -> BRACK_BLOCK . (rule 190)
>> opsym -> BRACK_BLOCK . (rule 364)
>> unaryop -> BRACK_BLOCK . (rule 409)
>> In actuality, this is not a conflict because opsym can *only* be the
>> exact BRACK_BLOCK "[||]", unaryop can *only* be the exact BRACK_BLOCK
>> "", and typeexpr can be *anything but* these two semantic lists.
>> Is it possible to write wisent rules that correspond to this
>> situation to resolve these conflicts in the case where the
>> semantic-lex-depth is necessarily zero?
> In a such case, the simplest solution I can think of, is to extend the
> lexer to produce different lexical tokens for "[||]" and "", for
> example OPSYM_BRACK_BLOCK and UNARYOP_BRACK_BLOCK, and use them in
> your grammar rules.
This sounds like the right answer for my case.
> Another solution could be to unify the conflicting typeexpr, opsym and
> unaryop rules. For example replace them by BRACK_BLOCK. Then analyze
> the different cases in the corresponding EXPANDFULL sub-parse rules.
If the rules were relatively simple, this would be a possibility, but
unfortunately, type expressions and expressions have dozens of
subcases, so is a mess.
> Hope I was clear enough ;-)