input grammar: c++-types.y
State 17 conflicts: 1 reduce/reduce
0 $accept → prog $end 1 prog → %empty 2 | prog stmt 3 stmt → expr ';' 4 | decl 5 | error ';' 6 expr → "identifier" 7 | "typename" '(' expr ')' 8 | expr '+' expr 9 | expr '=' expr 10 decl → "typename" declarator ';' 11 | "typename" declarator '=' expr ';' 12 declarator → "identifier" 13 | '(' declarator ')'
0 $accept → • prog $end 1 prog → • %empty 2 | • prog stmt $default reduce using rule 1 (prog) prog go to state 1
0 $accept → prog • $end 2 prog → prog • stmt 3 stmt → • expr ';' 4 | • decl 5 | • error ';' 6 expr → • "identifier" 7 | • "typename" '(' expr ')' 8 | • expr '+' expr 9 | • expr '=' expr 10 decl → • "typename" declarator ';' 11 | • "typename" declarator '=' expr ';' $end shift, and go to state 2 error shift, and go to state 3 "typename" shift, and go to state 4 "identifier" shift, and go to state 5 stmt go to state 6 expr go to state 7 decl go to state 8
0 $accept → prog $end • $default accept
5 stmt → error • ';' ';' shift, and go to state 9
7 expr → "typename" • '(' expr ')' 10 decl → "typename" • declarator ';' 11 | "typename" • declarator '=' expr ';' 12 declarator → • "identifier" 13 | • '(' declarator ')' "identifier" shift, and go to state 10 '(' shift, and go to state 11 declarator go to state 12
6 expr → "identifier" • $default reduce using rule 6 (expr)
2 prog → prog stmt • $default reduce using rule 2 (prog)
3 stmt → expr • ';' 8 expr → expr • '+' expr 9 | expr • '=' expr '=' shift, and go to state 13 '+' shift, and go to state 14 ';' shift, and go to state 15
4 stmt → decl • $default reduce using rule 4 (stmt)
5 stmt → error ';' • $default reduce using rule 5 (stmt)
12 declarator → "identifier" • $default reduce using rule 12 (declarator)
6 expr → • "identifier" 7 | • "typename" '(' expr ')' 7 | "typename" '(' • expr ')' 8 | • expr '+' expr 9 | • expr '=' expr 12 declarator → • "identifier" 13 | • '(' declarator ')' 13 | '(' • declarator ')' "typename" shift, and go to state 16 "identifier" shift, and go to state 17 '(' shift, and go to state 18 expr go to state 19 declarator go to state 20
10 decl → "typename" declarator • ';' 11 | "typename" declarator • '=' expr ';' '=' shift, and go to state 21 ';' shift, and go to state 22
6 expr → • "identifier" 7 | • "typename" '(' expr ')' 8 | • expr '+' expr 9 | • expr '=' expr 9 | expr '=' • expr "typename" shift, and go to state 16 "identifier" shift, and go to state 5 expr go to state 23
6 expr → • "identifier" 7 | • "typename" '(' expr ')' 8 | • expr '+' expr 8 | expr '+' • expr 9 | • expr '=' expr "typename" shift, and go to state 16 "identifier" shift, and go to state 5 expr go to state 24
3 stmt → expr ';' • $default reduce using rule 3 (stmt)
7 expr → "typename" • '(' expr ')' '(' shift, and go to state 25
6 expr → "identifier" • ['=', '+', ')'] 12 declarator → "identifier" • [')'] ')' reduce using rule 6 (expr) ')' [reduce using rule 12 (declarator)] $default reduce using rule 6 (expr)
12 declarator → • "identifier" 13 | • '(' declarator ')' 13 | '(' • declarator ')' "identifier" shift, and go to state 10 '(' shift, and go to state 18 declarator go to state 20
7 expr → "typename" '(' expr • ')' 8 | expr • '+' expr 9 | expr • '=' expr '=' shift, and go to state 13 '+' shift, and go to state 14 ')' shift, and go to state 26
13 declarator → '(' declarator • ')' ')' shift, and go to state 27
6 expr → • "identifier" 7 | • "typename" '(' expr ')' 8 | • expr '+' expr 9 | • expr '=' expr 11 decl → "typename" declarator '=' • expr ';' "typename" shift, and go to state 16 "identifier" shift, and go to state 5 expr go to state 28
10 decl → "typename" declarator ';' • $default reduce using rule 10 (decl)
8 expr → expr • '+' expr 9 | expr • '=' expr 9 | expr '=' expr • [';', ')'] '=' shift, and go to state 13 '+' shift, and go to state 14 $default reduce using rule 9 (expr) Conflict between rule 9 and token '=' resolved as shift (%right '='). Conflict between rule 9 and token '+' resolved as shift ('=' < '+').
8 expr → expr • '+' expr 8 | expr '+' expr • ['=', '+', ';', ')'] 9 | expr • '=' expr $default reduce using rule 8 (expr) Conflict between rule 8 and token '=' resolved as reduce ('=' < '+'). Conflict between rule 8 and token '+' resolved as reduce (%left '+').
6 expr → • "identifier" 7 | • "typename" '(' expr ')' 7 | "typename" '(' • expr ')' 8 | • expr '+' expr 9 | • expr '=' expr "typename" shift, and go to state 16 "identifier" shift, and go to state 5 expr go to state 19
7 expr → "typename" '(' expr ')' • $default reduce using rule 7 (expr)
13 declarator → '(' declarator ')' • $default reduce using rule 13 (declarator)
8 expr → expr • '+' expr 9 | expr • '=' expr 11 decl → "typename" declarator '=' expr • ';' '=' shift, and go to state 13 '+' shift, and go to state 14 ';' shift, and go to state 29
11 decl → "typename" declarator '=' expr ';' • $default reduce using rule 11 (decl)