Commit 60bf0ea6 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Improve [make test] to compare the .automaton and .conflicts file against a reference.

parent 28d518b4
This diff is collapsed.
** Conflict (shift/reduce) in state 516.
** Token involved: KWelse
** This state is reached from program after reading:
KWif Llparen expression Lrparen KWif Llparen expression Lrparen statement
** The derivations that appear below have the following common factor:
** (The question mark symbol (?) represents the spot where the derivations begin to differ.)
program
source_elements Leof
source_element
statement
if_statement
(?)
** In state 516, looking ahead at KWelse, shifting is permitted
** because of the following sub-derivation:
KWif Llparen expression Lrparen statement KWelse statement
if_statement
KWif Llparen expression Lrparen statement . KWelse statement
** In state 516, looking ahead at KWelse, reducing production
** if_statement -> KWif Llparen expression Lrparen statement
** is permitted because of the following sub-derivation:
KWif Llparen expression Lrparen statement KWelse statement // lookahead token appears
if_statement // lookahead token is inherited
KWif Llparen expression Lrparen statement .
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
State 0:
declarations' -> . declarations [ # ]
-- On VAR shift to state 1
-- On declarations shift to state 10
State 1:
declarations -> VAR . EQUAL expr EOF [ # ]
-- On EQUAL shift to state 2
State 2:
declarations -> VAR EQUAL . expr EOF [ # ]
-- On VAR shift to state 3
-- On FAIL shift to state 4
-- On CONST shift to state 5
-- On expr shift to state 6
State 3:
expr -> VAR . [ PLUS EOF ]
-- On PLUS reduce production expr -> VAR
-- On EOF reduce production expr -> VAR
State 4:
expr -> FAIL . [ PLUS EOF ]
-- On PLUS reduce production expr -> FAIL
-- On EOF reduce production expr -> FAIL
State 5:
expr -> CONST . [ PLUS EOF ]
-- On PLUS reduce production expr -> CONST
-- On EOF reduce production expr -> CONST
State 6:
declarations -> VAR EQUAL expr . EOF [ # ]
expr -> expr . PLUS expr [ PLUS EOF ]
-- On PLUS shift to state 7
-- On EOF shift to state 9
State 7:
expr -> expr PLUS . expr [ PLUS EOF ]
-- On VAR shift to state 3
-- On FAIL shift to state 4
-- On CONST shift to state 5
-- On expr shift to state 8
State 8:
expr -> expr . PLUS expr [ PLUS EOF ]
expr -> expr PLUS expr . [ PLUS EOF ]
-- On PLUS reduce production expr -> expr PLUS expr
-- On EOF reduce production expr -> expr PLUS expr
State 9:
declarations -> VAR EQUAL expr EOF . [ # ]
-- On # reduce production declarations -> VAR EQUAL expr EOF
State 10:
declarations' -> declarations . [ # ]
-- On # accept declarations
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment