freebsd-skq/contrib/byacc/test/btyacc/btyacc_demo.output

1299 lines
21 KiB
Plaintext
Raw Normal View History

2014-04-22 22:11:22 +00:00
0 $accept : input $end
1 opt_scope :
2 | CLCL
3 | opt_scope ID CLCL
4 typename : opt_scope ID
5 $$1 :
6 input : $$1 decl_list
7 decl_list :
8 $$2 :
9 decl_list : decl_list $$2 decl
2016-10-04 22:22:32 +00:00
10 decl : decl_specs declarator_list ';'
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
11 $$3 :
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
12 decl : decl_specs declarator $$3 block_statement
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
13 decl_specs : decl_spec
14 | decl_specs $$2 decl_spec
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
15 cv_quals :
16 | cv_quals cv_qual
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
17 decl_spec : cv_qual
18 | typename
19 | EXTERN
20 | REGISTER
21 | STATIC
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
22 cv_qual : CONST
23 | VOLATILE
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
24 $$4 :
2014-04-22 22:11:22 +00:00
25 $$5 :
2016-10-04 22:22:32 +00:00
26 declarator_list : declarator_list ',' $$4 $$5 declarator
27 | declarator
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
28 declarator :
29 | ID
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
30 $$6 :
2014-04-22 22:11:22 +00:00
31 $$7 :
2016-10-04 22:22:32 +00:00
32 declarator : '(' $$6 $$7 declarator ')'
33 | '*' cv_quals $$4 $$5 declarator
34 | declarator '[' $$4 expr ']'
35 | declarator '(' $$4 formal_arg_list ')' cv_quals
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
36 formal_arg_list :
37 | nonempty_formal_arg_list
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
38 nonempty_formal_arg_list : nonempty_formal_arg_list ',' $$6 formal_arg
39 | formal_arg
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
40 formal_arg : decl_specs declarator
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
41 expr : expr '+' $$6 expr
42 | expr '-' $$6 expr
43 | expr '*' $$6 expr
44 | expr '%' $$6 expr
45 | expr '/' $$6 expr
46 | '*' $$2 expr
47 | ID
48 | CONSTANT
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
49 statement : decl
50 | expr ';'
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
51 $$8 :
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
52 $$9 :
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
53 statement : IF '(' $$6 expr ')' THEN $$8 statement ELSE $$9 statement
54 | IF '(' $$6 expr ')' THEN $$8 statement
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
55 $$10 :
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
56 statement : $$10 block_statement
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
57 statement_list :
58 | statement_list $$2 statement
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
59 block_statement : '{' $$2 statement_list '}'
2014-04-22 22:11:22 +00:00
state 0
$accept : . input $end (0)
$$1 : . (5)
. reduce 5
input goto 1
$$1 goto 2
state 1
$accept : input . $end (0)
$end accept
state 2
input : $$1 . decl_list (6)
decl_list : . (7)
. reduce 7
decl_list goto 3
state 3
input : $$1 decl_list . (6)
decl_list : decl_list . $$2 decl (9)
$$2 : . (8)
$end reduce 6
ID reduce 8
EXTERN reduce 8
REGISTER reduce 8
STATIC reduce 8
CONST reduce 8
VOLATILE reduce 8
CLCL reduce 8
$$2 goto 4
state 4
decl_list : decl_list $$2 . decl (9)
opt_scope : . (1)
EXTERN shift 5
REGISTER shift 6
STATIC shift 7
CONST shift 8
VOLATILE shift 9
CLCL shift 10
ID reduce 1
decl goto 11
decl_specs goto 12
decl_spec goto 13
typename goto 14
cv_qual goto 15
opt_scope goto 16
state 5
2016-10-04 22:22:32 +00:00
decl_spec : EXTERN . (19)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 19
2014-04-22 22:11:22 +00:00
state 6
2016-10-04 22:22:32 +00:00
decl_spec : REGISTER . (20)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 20
2014-04-22 22:11:22 +00:00
state 7
2016-10-04 22:22:32 +00:00
decl_spec : STATIC . (21)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 21
2014-04-22 22:11:22 +00:00
state 8
2016-10-04 22:22:32 +00:00
cv_qual : CONST . (22)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 22
2014-04-22 22:11:22 +00:00
state 9
2016-10-04 22:22:32 +00:00
cv_qual : VOLATILE . (23)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 23
2014-04-22 22:11:22 +00:00
state 10
opt_scope : CLCL . (2)
. reduce 2
state 11
decl_list : decl_list $$2 decl . (9)
. reduce 9
2016-10-04 22:22:32 +00:00
12: shift/reduce conflict (shift 18, reduce 28) on '('
12: shift/reduce conflict (shift 19, reduce 8) on ID
2014-04-22 22:11:22 +00:00
state 12
2016-10-04 22:22:32 +00:00
decl : decl_specs . declarator_list ';' (10)
decl : decl_specs . declarator $$3 block_statement (12)
decl_specs : decl_specs . $$2 decl_spec (14)
2014-04-22 22:11:22 +00:00
$$2 : . (8)
2016-10-04 22:22:32 +00:00
declarator : . (28)
'*' shift 17
'(' [trial] shift 18
ID [trial] shift 19
'(' [trial] reduce 28
'[' reduce 28
ID [trial] reduce 8
EXTERN reduce 8
REGISTER reduce 8
STATIC reduce 8
CONST reduce 8
VOLATILE reduce 8
CLCL reduce 8
';' reduce 28
',' reduce 28
'{' reduce 28
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
declarator_list goto 20
declarator goto 21
$$2 goto 22
2014-04-22 22:11:22 +00:00
state 13
2016-10-04 22:22:32 +00:00
decl_specs : decl_spec . (13)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 13
2014-04-22 22:11:22 +00:00
state 14
2016-10-04 22:22:32 +00:00
decl_spec : typename . (18)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 18
2014-04-22 22:11:22 +00:00
state 15
2016-10-04 22:22:32 +00:00
decl_spec : cv_qual . (17)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 17
2014-04-22 22:11:22 +00:00
state 16
opt_scope : opt_scope . ID CLCL (3)
typename : opt_scope . ID (4)
2016-10-04 22:22:32 +00:00
ID shift 23
2014-04-22 22:11:22 +00:00
. error
state 17
2016-10-04 22:22:32 +00:00
declarator : '*' . cv_quals $$4 $$5 declarator (33)
cv_quals : . (15)
. reduce 15
cv_quals goto 24
state 18
declarator : '(' . $$6 $$7 declarator ')' (32)
$$6 : . (30)
. reduce 30
$$6 goto 25
state 19
declarator : ID . (29)
. reduce 29
state 20
decl : decl_specs declarator_list . ';' (10)
declarator_list : declarator_list . ',' $$4 $$5 declarator (26)
';' shift 26
',' shift 27
. error
state 21
decl : decl_specs declarator . $$3 block_statement (12)
declarator_list : declarator . (27)
declarator : declarator . '[' $$4 expr ']' (34)
declarator : declarator . '(' $$4 formal_arg_list ')' cv_quals (35)
$$3 : . (11)
'(' shift 28
'[' shift 29
';' reduce 27
',' reduce 27
'{' reduce 11
$$3 goto 30
state 22
decl_specs : decl_specs $$2 . decl_spec (14)
2014-04-22 22:11:22 +00:00
opt_scope : . (1)
EXTERN shift 5
REGISTER shift 6
STATIC shift 7
CONST shift 8
VOLATILE shift 9
CLCL shift 10
2016-10-04 22:22:32 +00:00
ID reduce 1
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
decl_spec goto 31
2014-04-22 22:11:22 +00:00
typename goto 14
cv_qual goto 15
opt_scope goto 16
2016-10-04 22:22:32 +00:00
23: shift/reduce conflict (shift 32, reduce 4) on CLCL
state 23
2014-04-22 22:11:22 +00:00
opt_scope : opt_scope ID . CLCL (3)
typename : opt_scope ID . (4)
2016-10-04 22:22:32 +00:00
CLCL [trial] shift 32
2014-04-22 22:11:22 +00:00
'*' reduce 4
'(' reduce 4
'[' reduce 4
ID reduce 4
EXTERN reduce 4
REGISTER reduce 4
STATIC reduce 4
CONST reduce 4
VOLATILE reduce 4
CLCL [trial] reduce 4
';' reduce 4
',' reduce 4
')' reduce 4
'{' reduce 4
2016-10-04 22:22:32 +00:00
state 24
cv_quals : cv_quals . cv_qual (16)
declarator : '*' cv_quals . $$4 $$5 declarator (33)
$$4 : . (24)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
CONST shift 8
VOLATILE shift 9
'*' reduce 24
'(' reduce 24
'[' reduce 24
ID reduce 24
';' reduce 24
',' reduce 24
')' reduce 24
'{' reduce 24
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
cv_qual goto 33
$$4 goto 34
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 25
declarator : '(' $$6 . $$7 declarator ')' (32)
2014-04-22 22:11:22 +00:00
$$7 : . (31)
. reduce 31
2016-10-04 22:22:32 +00:00
$$7 goto 35
2014-04-22 22:11:22 +00:00
state 26
2016-10-04 22:22:32 +00:00
decl : decl_specs declarator_list ';' . (10)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 10
2014-04-22 22:11:22 +00:00
state 27
2016-10-04 22:22:32 +00:00
declarator_list : declarator_list ',' . $$4 $$5 declarator (26)
$$4 : . (24)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 24
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$4 goto 36
2014-04-22 22:11:22 +00:00
state 28
2016-10-04 22:22:32 +00:00
declarator : declarator '(' . $$4 formal_arg_list ')' cv_quals (35)
$$4 : . (24)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 24
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$4 goto 37
2014-04-22 22:11:22 +00:00
state 29
2016-10-04 22:22:32 +00:00
declarator : declarator '[' . $$4 expr ']' (34)
$$4 : . (24)
. reduce 24
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$4 goto 38
2014-04-22 22:11:22 +00:00
state 30
2016-10-04 22:22:32 +00:00
decl : decl_specs declarator $$3 . block_statement (12)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'{' shift 39
. error
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
block_statement goto 40
2014-04-22 22:11:22 +00:00
state 31
2016-10-04 22:22:32 +00:00
decl_specs : decl_specs $$2 decl_spec . (14)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 14
2014-04-22 22:11:22 +00:00
state 32
2016-10-04 22:22:32 +00:00
opt_scope : opt_scope ID CLCL . (3)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 3
2014-04-22 22:11:22 +00:00
state 33
2016-10-04 22:22:32 +00:00
cv_quals : cv_quals cv_qual . (16)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 16
2014-04-22 22:11:22 +00:00
state 34
2016-10-04 22:22:32 +00:00
declarator : '*' cv_quals $$4 . $$5 declarator (33)
$$5 : . (25)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 25
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$5 goto 41
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
35: shift/reduce conflict (shift 18, reduce 28) on '('
2014-04-22 22:11:22 +00:00
state 35
2016-10-04 22:22:32 +00:00
declarator : '(' $$6 $$7 . declarator ')' (32)
declarator : . (28)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 17
'(' [trial] shift 18
ID shift 19
'(' [trial] reduce 28
'[' reduce 28
')' reduce 28
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
declarator goto 42
2014-04-22 22:11:22 +00:00
state 36
2016-10-04 22:22:32 +00:00
declarator_list : declarator_list ',' $$4 . $$5 declarator (26)
$$5 : . (25)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 25
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$5 goto 43
2014-04-22 22:11:22 +00:00
state 37
2016-10-04 22:22:32 +00:00
declarator : declarator '(' $$4 . formal_arg_list ')' cv_quals (35)
2014-04-22 22:11:22 +00:00
opt_scope : . (1)
2016-10-04 22:22:32 +00:00
formal_arg_list : . (36)
2014-04-22 22:11:22 +00:00
EXTERN shift 5
REGISTER shift 6
STATIC shift 7
CONST shift 8
VOLATILE shift 9
CLCL shift 10
ID reduce 1
2016-10-04 22:22:32 +00:00
')' reduce 36
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
formal_arg goto 44
decl_specs goto 45
2014-04-22 22:11:22 +00:00
decl_spec goto 13
typename goto 14
cv_qual goto 15
opt_scope goto 16
2016-10-04 22:22:32 +00:00
formal_arg_list goto 46
nonempty_formal_arg_list goto 47
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 38
declarator : declarator '[' $$4 . expr ']' (34)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
. error
2016-10-04 22:22:32 +00:00
expr goto 51
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 39
block_statement : '{' . $$2 statement_list '}' (59)
2014-04-22 22:11:22 +00:00
$$2 : . (8)
. reduce 8
2016-10-04 22:22:32 +00:00
$$2 goto 52
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 40
decl : decl_specs declarator $$3 block_statement . (12)
. reduce 12
41: shift/reduce conflict (shift 18, reduce 28) on '('
2014-04-22 22:11:22 +00:00
state 41
2016-10-04 22:22:32 +00:00
declarator : '*' cv_quals $$4 $$5 . declarator (33)
declarator : . (28)
'*' shift 17
'(' [trial] shift 18
ID shift 19
'(' [trial] reduce 28
'[' reduce 28
';' reduce 28
',' reduce 28
')' reduce 28
'{' reduce 28
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
declarator goto 53
2014-04-22 22:11:22 +00:00
state 42
2016-10-04 22:22:32 +00:00
declarator : '(' $$6 $$7 declarator . ')' (32)
declarator : declarator . '[' $$4 expr ']' (34)
declarator : declarator . '(' $$4 formal_arg_list ')' cv_quals (35)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'(' shift 28
'[' shift 29
')' shift 54
. error
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
43: shift/reduce conflict (shift 18, reduce 28) on '('
2014-04-22 22:11:22 +00:00
state 43
2016-10-04 22:22:32 +00:00
declarator_list : declarator_list ',' $$4 $$5 . declarator (26)
declarator : . (28)
'*' shift 17
'(' [trial] shift 18
ID shift 19
'(' [trial] reduce 28
'[' reduce 28
';' reduce 28
',' reduce 28
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
declarator goto 55
2014-04-22 22:11:22 +00:00
state 44
2016-10-04 22:22:32 +00:00
nonempty_formal_arg_list : formal_arg . (39)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 39
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
45: shift/reduce conflict (shift 18, reduce 28) on '('
45: shift/reduce conflict (shift 19, reduce 8) on ID
2014-04-22 22:11:22 +00:00
state 45
2016-10-04 22:22:32 +00:00
decl_specs : decl_specs . $$2 decl_spec (14)
formal_arg : decl_specs . declarator (40)
$$2 : . (8)
declarator : . (28)
'*' shift 17
'(' [trial] shift 18
ID [trial] shift 19
'(' [trial] reduce 28
'[' reduce 28
ID [trial] reduce 8
EXTERN reduce 8
REGISTER reduce 8
STATIC reduce 8
CONST reduce 8
VOLATILE reduce 8
CLCL reduce 8
',' reduce 28
')' reduce 28
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
declarator goto 56
$$2 goto 22
2014-04-22 22:11:22 +00:00
state 46
2016-10-04 22:22:32 +00:00
declarator : declarator '(' $$4 formal_arg_list . ')' cv_quals (35)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
')' shift 57
. error
2014-04-22 22:11:22 +00:00
state 47
2016-10-04 22:22:32 +00:00
formal_arg_list : nonempty_formal_arg_list . (37)
nonempty_formal_arg_list : nonempty_formal_arg_list . ',' $$6 formal_arg (38)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
',' shift 58
')' reduce 37
2014-04-22 22:11:22 +00:00
state 48
2016-10-04 22:22:32 +00:00
expr : '*' . $$2 expr (46)
$$2 : . (8)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 8
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$2 goto 59
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 49
expr : ID . (47)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 47
2014-04-22 22:11:22 +00:00
state 50
2016-10-04 22:22:32 +00:00
expr : CONSTANT . (48)
2014-04-22 22:11:22 +00:00
. reduce 48
state 51
2016-10-04 22:22:32 +00:00
declarator : declarator '[' $$4 expr . ']' (34)
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
'+' shift 60
'-' shift 61
'*' shift 62
'/' shift 63
'%' shift 64
']' shift 65
. error
2014-04-22 22:11:22 +00:00
state 52
2016-10-04 22:22:32 +00:00
block_statement : '{' $$2 . statement_list '}' (59)
statement_list : . (57)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 57
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
statement_list goto 66
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 53
declarator : '*' cv_quals $$4 $$5 declarator . (33)
declarator : declarator . '[' $$4 expr ']' (34)
declarator : declarator . '(' $$4 formal_arg_list ')' cv_quals (35)
'(' shift 28
'[' shift 29
';' reduce 33
',' reduce 33
')' reduce 33
'{' reduce 33
2014-04-22 22:11:22 +00:00
state 54
2016-10-04 22:22:32 +00:00
declarator : '(' $$6 $$7 declarator ')' . (32)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 32
2014-04-22 22:11:22 +00:00
state 55
2016-10-04 22:22:32 +00:00
declarator_list : declarator_list ',' $$4 $$5 declarator . (26)
declarator : declarator . '[' $$4 expr ']' (34)
declarator : declarator . '(' $$4 formal_arg_list ')' cv_quals (35)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'(' shift 28
'[' shift 29
';' reduce 26
',' reduce 26
2014-04-22 22:11:22 +00:00
state 56
2016-10-04 22:22:32 +00:00
declarator : declarator . '[' $$4 expr ']' (34)
declarator : declarator . '(' $$4 formal_arg_list ')' cv_quals (35)
formal_arg : decl_specs declarator . (40)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'(' shift 28
'[' shift 29
',' reduce 40
')' reduce 40
2014-04-22 22:11:22 +00:00
state 57
2016-10-04 22:22:32 +00:00
declarator : declarator '(' $$4 formal_arg_list ')' . cv_quals (35)
cv_quals : . (15)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 15
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
cv_quals goto 67
2014-04-22 22:11:22 +00:00
state 58
2016-10-04 22:22:32 +00:00
nonempty_formal_arg_list : nonempty_formal_arg_list ',' . $$6 formal_arg (38)
$$6 : . (30)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 30
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$6 goto 68
2014-04-22 22:11:22 +00:00
state 59
2016-10-04 22:22:32 +00:00
expr : '*' $$2 . expr (46)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
. error
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
expr goto 69
2014-04-22 22:11:22 +00:00
state 60
2016-10-04 22:22:32 +00:00
expr : expr '+' . $$6 expr (41)
$$6 : . (30)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 30
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$6 goto 70
2014-04-22 22:11:22 +00:00
state 61
2016-10-04 22:22:32 +00:00
expr : expr '-' . $$6 expr (42)
$$6 : . (30)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 30
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$6 goto 71
2014-04-22 22:11:22 +00:00
state 62
2016-10-04 22:22:32 +00:00
expr : expr '*' . $$6 expr (43)
$$6 : . (30)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 30
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$6 goto 72
2014-04-22 22:11:22 +00:00
state 63
2016-10-04 22:22:32 +00:00
expr : expr '/' . $$6 expr (45)
$$6 : . (30)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 30
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$6 goto 73
2014-04-22 22:11:22 +00:00
state 64
2016-10-04 22:22:32 +00:00
expr : expr '%' . $$6 expr (44)
$$6 : . (30)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 30
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$6 goto 74
2014-04-22 22:11:22 +00:00
state 65
2016-10-04 22:22:32 +00:00
declarator : declarator '[' $$4 expr ']' . (34)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 34
2014-04-22 22:11:22 +00:00
state 66
2016-10-04 22:22:32 +00:00
statement_list : statement_list . $$2 statement (58)
block_statement : '{' $$2 statement_list . '}' (59)
2014-04-22 22:11:22 +00:00
$$2 : . (8)
2016-10-04 22:22:32 +00:00
'}' shift 75
2014-04-22 22:11:22 +00:00
'*' reduce 8
ID reduce 8
CONSTANT reduce 8
EXTERN reduce 8
REGISTER reduce 8
STATIC reduce 8
CONST reduce 8
VOLATILE reduce 8
IF reduce 8
CLCL reduce 8
'{' reduce 8
2016-10-04 22:22:32 +00:00
$$2 goto 76
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 67
cv_quals : cv_quals . cv_qual (16)
declarator : declarator '(' $$4 formal_arg_list ')' cv_quals . (35)
2014-04-22 22:11:22 +00:00
CONST shift 8
VOLATILE shift 9
2016-10-04 22:22:32 +00:00
'(' reduce 35
'[' reduce 35
';' reduce 35
',' reduce 35
')' reduce 35
'{' reduce 35
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
cv_qual goto 33
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 68
nonempty_formal_arg_list : nonempty_formal_arg_list ',' $$6 . formal_arg (38)
2014-04-22 22:11:22 +00:00
opt_scope : . (1)
EXTERN shift 5
REGISTER shift 6
STATIC shift 7
CONST shift 8
VOLATILE shift 9
CLCL shift 10
ID reduce 1
2016-10-04 22:22:32 +00:00
formal_arg goto 77
decl_specs goto 45
2014-04-22 22:11:22 +00:00
decl_spec goto 13
typename goto 14
cv_qual goto 15
opt_scope goto 16
2016-10-04 22:22:32 +00:00
state 69
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
expr : '*' $$2 expr . (46)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 46
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 70
expr : expr '+' $$6 . expr (41)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
. error
2016-10-04 22:22:32 +00:00
expr goto 78
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 71
expr : expr '-' $$6 . expr (42)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
. error
2016-10-04 22:22:32 +00:00
expr goto 79
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 72
expr : expr '*' $$6 . expr (43)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
. error
2016-10-04 22:22:32 +00:00
expr goto 80
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 73
expr : expr '/' $$6 . expr (45)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
. error
2016-10-04 22:22:32 +00:00
expr goto 81
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 74
expr : expr '%' $$6 . expr (44)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
. error
2016-10-04 22:22:32 +00:00
expr goto 82
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 75
block_statement : '{' $$2 statement_list '}' . (59)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 59
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
76: shift/reduce conflict (shift 49, reduce 1) on ID
state 76
statement_list : statement_list $$2 . statement (58)
2014-04-22 22:11:22 +00:00
opt_scope : . (1)
2016-10-04 22:22:32 +00:00
$$10 : . (55)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID [trial] shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
EXTERN shift 5
REGISTER shift 6
STATIC shift 7
CONST shift 8
VOLATILE shift 9
2016-10-04 22:22:32 +00:00
IF shift 83
2014-04-22 22:11:22 +00:00
CLCL shift 10
ID [trial] reduce 1
2016-10-04 22:22:32 +00:00
'{' reduce 55
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
expr goto 84
decl goto 85
statement goto 86
2014-04-22 22:11:22 +00:00
decl_specs goto 12
decl_spec goto 13
typename goto 14
cv_qual goto 15
opt_scope goto 16
2016-10-04 22:22:32 +00:00
$$10 goto 87
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 77
nonempty_formal_arg_list : nonempty_formal_arg_list ',' $$6 formal_arg . (38)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 38
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 78
expr : expr . '+' $$6 expr (41)
expr : expr '+' $$6 expr . (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
'*' shift 62
'/' shift 63
'%' shift 64
'+' reduce 41
'-' reduce 41
';' reduce 41
')' reduce 41
']' reduce 41
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 79
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr '-' $$6 expr . (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
'*' shift 62
'/' shift 63
'%' shift 64
2014-04-22 22:11:22 +00:00
'+' reduce 42
'-' reduce 42
';' reduce 42
')' reduce 42
']' reduce 42
2016-10-04 22:22:32 +00:00
state 80
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr '*' $$6 expr . (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
. reduce 43
state 81
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
expr : expr '/' $$6 expr . (45)
. reduce 45
2014-04-22 22:11:22 +00:00
state 82
2016-10-04 22:22:32 +00:00
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr '%' $$6 expr . (44)
expr : expr . '/' $$6 expr (45)
. reduce 44
2014-04-22 22:11:22 +00:00
state 83
2016-10-04 22:22:32 +00:00
statement : IF . '(' $$6 expr ')' THEN $$8 statement ELSE $$9 statement (53)
statement : IF . '(' $$6 expr ')' THEN $$8 statement (54)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'(' shift 88
. error
2014-04-22 22:11:22 +00:00
state 84
2016-10-04 22:22:32 +00:00
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
statement : expr . ';' (50)
'+' shift 60
'-' shift 61
'*' shift 62
'/' shift 63
'%' shift 64
';' shift 89
. error
2014-04-22 22:11:22 +00:00
state 85
2016-10-04 22:22:32 +00:00
statement : decl . (49)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 49
2014-04-22 22:11:22 +00:00
state 86
2016-10-04 22:22:32 +00:00
statement_list : statement_list $$2 statement . (58)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 58
2014-04-22 22:11:22 +00:00
state 87
2016-10-04 22:22:32 +00:00
statement : $$10 . block_statement (56)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'{' shift 39
. error
block_statement goto 90
2014-04-22 22:11:22 +00:00
state 88
2016-10-04 22:22:32 +00:00
statement : IF '(' . $$6 expr ')' THEN $$8 statement ELSE $$9 statement (53)
statement : IF '(' . $$6 expr ')' THEN $$8 statement (54)
$$6 : . (30)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 30
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$6 goto 91
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 89
statement : expr ';' . (50)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 50
2014-04-22 22:11:22 +00:00
state 90
2016-10-04 22:22:32 +00:00
statement : $$10 block_statement . (56)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 56
2014-04-22 22:11:22 +00:00
state 91
2016-10-04 22:22:32 +00:00
statement : IF '(' $$6 . expr ')' THEN $$8 statement ELSE $$9 statement (53)
statement : IF '(' $$6 . expr ')' THEN $$8 statement (54)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID shift 49
CONSTANT shift 50
. error
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
expr goto 92
2014-04-22 22:11:22 +00:00
state 92
2016-10-04 22:22:32 +00:00
expr : expr . '+' $$6 expr (41)
expr : expr . '-' $$6 expr (42)
expr : expr . '*' $$6 expr (43)
expr : expr . '%' $$6 expr (44)
expr : expr . '/' $$6 expr (45)
statement : IF '(' $$6 expr . ')' THEN $$8 statement ELSE $$9 statement (53)
statement : IF '(' $$6 expr . ')' THEN $$8 statement (54)
'+' shift 60
'-' shift 61
'*' shift 62
'/' shift 63
'%' shift 64
')' shift 93
2014-04-22 22:11:22 +00:00
. error
state 93
2016-10-04 22:22:32 +00:00
statement : IF '(' $$6 expr ')' . THEN $$8 statement ELSE $$9 statement (53)
statement : IF '(' $$6 expr ')' . THEN $$8 statement (54)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
THEN shift 94
. error
2014-04-22 22:11:22 +00:00
state 94
2016-10-04 22:22:32 +00:00
statement : IF '(' $$6 expr ')' THEN . $$8 statement ELSE $$9 statement (53)
statement : IF '(' $$6 expr ')' THEN . $$8 statement (54)
$$8 : . (51)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 51
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$8 goto 95
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
95: shift/reduce conflict (shift 49, reduce 1) on ID
2014-04-22 22:11:22 +00:00
state 95
2016-10-04 22:22:32 +00:00
statement : IF '(' $$6 expr ')' THEN $$8 . statement ELSE $$9 statement (53)
statement : IF '(' $$6 expr ')' THEN $$8 . statement (54)
2014-04-22 22:11:22 +00:00
opt_scope : . (1)
2016-10-04 22:22:32 +00:00
$$10 : . (55)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID [trial] shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
EXTERN shift 5
REGISTER shift 6
STATIC shift 7
CONST shift 8
VOLATILE shift 9
2016-10-04 22:22:32 +00:00
IF shift 83
2014-04-22 22:11:22 +00:00
CLCL shift 10
ID [trial] reduce 1
2016-10-04 22:22:32 +00:00
'{' reduce 55
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
expr goto 84
decl goto 85
statement goto 96
2014-04-22 22:11:22 +00:00
decl_specs goto 12
decl_spec goto 13
typename goto 14
cv_qual goto 15
opt_scope goto 16
2016-10-04 22:22:32 +00:00
$$10 goto 87
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
96: shift/reduce conflict (shift 97, reduce 54) on ELSE
state 96
statement : IF '(' $$6 expr ')' THEN $$8 statement . ELSE $$9 statement (53)
statement : IF '(' $$6 expr ')' THEN $$8 statement . (54)
ELSE [trial] shift 97
'*' reduce 54
ID reduce 54
CONSTANT reduce 54
EXTERN reduce 54
REGISTER reduce 54
STATIC reduce 54
CONST reduce 54
VOLATILE reduce 54
IF reduce 54
ELSE [trial] reduce 54
CLCL reduce 54
'{' reduce 54
'}' reduce 54
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 97
statement : IF '(' $$6 expr ')' THEN $$8 statement ELSE . $$9 statement (53)
$$9 : . (52)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 52
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
$$9 goto 98
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
98: shift/reduce conflict (shift 49, reduce 1) on ID
state 98
statement : IF '(' $$6 expr ')' THEN $$8 statement ELSE $$9 . statement (53)
2014-04-22 22:11:22 +00:00
opt_scope : . (1)
2016-10-04 22:22:32 +00:00
$$10 : . (55)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
'*' shift 48
ID [trial] shift 49
CONSTANT shift 50
2014-04-22 22:11:22 +00:00
EXTERN shift 5
REGISTER shift 6
STATIC shift 7
CONST shift 8
VOLATILE shift 9
2016-10-04 22:22:32 +00:00
IF shift 83
2014-04-22 22:11:22 +00:00
CLCL shift 10
ID [trial] reduce 1
2016-10-04 22:22:32 +00:00
'{' reduce 55
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
expr goto 84
decl goto 85
statement goto 99
2014-04-22 22:11:22 +00:00
decl_specs goto 12
decl_spec goto 13
typename goto 14
cv_qual goto 15
opt_scope goto 16
2016-10-04 22:22:32 +00:00
$$10 goto 87
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
state 99
statement : IF '(' $$6 expr ')' THEN $$8 statement ELSE $$9 statement . (53)
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
. reduce 53
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
State 12 contains 2 shift/reduce conflicts.
State 23 contains 1 shift/reduce conflict.
State 35 contains 1 shift/reduce conflict.
State 41 contains 1 shift/reduce conflict.
State 43 contains 1 shift/reduce conflict.
State 45 contains 2 shift/reduce conflicts.
State 76 contains 1 shift/reduce conflict.
State 95 contains 1 shift/reduce conflict.
State 96 contains 1 shift/reduce conflict.
State 98 contains 1 shift/reduce conflict.
2014-04-22 22:11:22 +00:00
2016-10-04 22:22:32 +00:00
29 terminals, 29 nonterminals
60 grammar rules, 100 states
2014-04-22 22:11:22 +00:00
grammar parser grammar
symbol# value# symbol
0 0 $end
1 256 error
2 43 '+'
3 45 '-'
4 42 '*'
5 47 '/'
6 37 '%'
7 257 PREFIX
8 258 POSTFIX
9 40 '('
10 91 '['
11 46 '.'
12 259 ID
13 260 CONSTANT
14 261 EXTERN
15 262 REGISTER
16 263 STATIC
17 264 CONST
18 265 VOLATILE
19 266 IF
20 267 THEN
21 268 ELSE
22 269 CLCL
23 59 ';'
24 44 ','
25 41 ')'
26 93 ']'
27 123 '{'
28 125 '}'
29 270 $accept
30 271 input
31 272 expr
32 273 decl
33 274 declarator_list
34 275 decl_list
35 276 statement
36 277 statement_list
37 278 block_statement
38 279 declarator
39 280 formal_arg
40 281 decl_specs
41 282 decl_spec
42 283 typename
43 284 cv_quals
44 285 cv_qual
45 286 opt_scope
46 287 formal_arg_list
47 288 nonempty_formal_arg_list
48 289 $$1
49 290 $$2
50 291 $$3
51 292 $$4
52 293 $$5
53 294 $$6
54 295 $$7
55 296 $$8
56 297 $$9
57 298 $$10