I faced conflict problem during yacc compilation.
Error message below:
24: shift/reduce conflict (shift 66, reduce 99) on '/'
state 24
arithmetic_leaf : absolute_path . (99)
absolute_path : absolute_path . '/' relative_path (102)
Code below:
arithmetic_leaf: '(' arithmetic_expression ')'
{
}
| integer_value
{
}
| real_value
{
}
| absolute_path
{
}
;
absolute_path: '/'
{
}
| '/' relative_path
{
}
| absolute_path '/' relative_path
{
}
;
relative_path: path_segment
{
}
| relative_path '/' path_segment
{
}
;
path_segment: V_ATTRIBUTE_IDENTIFIER V_LOCAL_TERM_CODE_REF
{
}
| V_ATTRIBUTE_IDENTIFIER '[' V_ARCHETYPE_ID ']'
{
}
| V_ATTRIBUTE_IDENTIFIER
{
}
;
At this point, 'shift/reduce' conflict will occur.
I don't know what is the problem. How to solve this conflict?
Thanks.