SBSPSS/Utils/Scripter/parser.v

788 lines
15 KiB
Coq
Raw Normal View History

2000-12-08 21:51:13 +01:00
0 $accept : program $end
1 program : statement_list
2 statement_list : statement_list statement
3 |
4 statement : END_STMT
5 | STOP END_STMT
6 | PAUSE END_STMT
2001-01-02 17:02:35 +01:00
7 | PRINT OPEN_PAR expression CLOSE_PAR END_STMT
2000-12-08 21:51:13 +01:00
8 | assign_expression END_STMT
2001-01-02 17:02:35 +01:00
9 | IF OPEN_PAR conditional CLOSE_PAR statement
10 | IF OPEN_PAR conditional CLOSE_PAR statement ELSE statement
11 | WHILE OPEN_PAR conditional CLOSE_PAR statement
12 | DO statement WHILE OPEN_PAR conditional CLOSE_PAR END_STMT
2000-12-20 21:15:24 +01:00
13 | BEGIN_CS statement_list END_CS
14 | function END_STMT
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
15 assign_expression : variable ASSIGN expression
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
16 conditional : expression EQUAL expression
17 | expression NOTEQUAL expression
18 | expression LESSTHAN expression
19 | expression GREATERTHAN expression
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
20 variable : VARIABLE
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
21 expression : VALUE
22 | OPEN_PAR expression CLOSE_PAR
23 | VARIABLE
24 | expression PLUS expression
25 | expression SUBTRACT expression
26 | expression MULTIPLY expression
27 | expression DIVIDE expression
28 | function
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
29 $$1 :
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
30 function : FUNCTION OPEN_PAR $$1 CLOSE_PAR
2000-12-08 21:51:13 +01:00
state 0
$accept : . program $end
statement_list : . (3)
. reduce 3
program goto 1
statement_list goto 2
state 1
$accept : program . $end (0)
$end accept
state 2
program : statement_list . (1)
statement_list : statement_list . statement
STOP shift 3
IF shift 4
2000-12-20 21:15:24 +01:00
WHILE shift 5
DO shift 6
PAUSE shift 7
PRINT shift 8
END_STMT shift 9
BEGIN_CS shift 10
VARIABLE shift 11
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
. reduce 1
2000-12-20 21:15:24 +01:00
statement goto 13
assign_expression goto 14
variable goto 15
function goto 16
2000-12-08 21:51:13 +01:00
state 3
statement : STOP . END_STMT
2000-12-20 21:15:24 +01:00
END_STMT shift 17
2000-12-08 21:51:13 +01:00
state 4
2001-01-02 17:02:35 +01:00
statement : IF . OPEN_PAR conditional CLOSE_PAR statement
statement : IF . OPEN_PAR conditional CLOSE_PAR statement ELSE statement
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 18
2000-12-08 21:51:13 +01:00
state 5
2001-01-02 17:02:35 +01:00
statement : WHILE . OPEN_PAR conditional CLOSE_PAR statement
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 19
2000-12-08 21:51:13 +01:00
state 6
2001-01-02 17:02:35 +01:00
statement : DO . statement WHILE OPEN_PAR conditional CLOSE_PAR END_STMT
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
STOP shift 3
IF shift 4
WHILE shift 5
DO shift 6
PAUSE shift 7
PRINT shift 8
END_STMT shift 9
BEGIN_CS shift 10
VARIABLE shift 11
FUNCTION shift 12
statement goto 20
assign_expression goto 14
variable goto 15
function goto 16
2000-12-08 21:51:13 +01:00
state 7
2000-12-20 21:15:24 +01:00
statement : PAUSE . END_STMT
END_STMT shift 21
state 8
2001-01-02 17:02:35 +01:00
statement : PRINT . OPEN_PAR expression CLOSE_PAR END_STMT
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 22
state 9
2000-12-08 21:51:13 +01:00
statement : END_STMT . (4)
. reduce 4
2000-12-20 21:15:24 +01:00
state 10
2000-12-08 21:51:13 +01:00
statement : BEGIN_CS . statement_list END_CS
statement_list : . (3)
. reduce 3
2000-12-20 21:15:24 +01:00
statement_list goto 23
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 11
2001-01-02 17:02:35 +01:00
variable : VARIABLE . (20)
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
. reduce 20
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 12
2000-12-15 21:29:33 +01:00
function : FUNCTION . OPEN_PAR $$1 CLOSE_PAR
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 24
2000-12-15 21:29:33 +01:00
2000-12-20 21:15:24 +01:00
state 13
2000-12-08 21:51:13 +01:00
statement_list : statement_list statement . (2)
. reduce 2
2000-12-20 21:15:24 +01:00
state 14
2000-12-08 21:51:13 +01:00
statement : assign_expression . END_STMT
2000-12-20 21:15:24 +01:00
END_STMT shift 25
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 15
2001-01-02 17:02:35 +01:00
assign_expression : variable . ASSIGN expression
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
ASSIGN shift 26
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 16
2000-12-15 21:29:33 +01:00
statement : function . END_STMT
2000-12-20 21:15:24 +01:00
END_STMT shift 27
2000-12-15 21:29:33 +01:00
2000-12-20 21:15:24 +01:00
state 17
2000-12-08 21:51:13 +01:00
statement : STOP END_STMT . (5)
. reduce 5
2000-12-20 21:15:24 +01:00
state 18
2001-01-02 17:02:35 +01:00
statement : IF OPEN_PAR . conditional CLOSE_PAR statement
statement : IF OPEN_PAR . conditional CLOSE_PAR statement ELSE statement
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 28
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
conditional goto 31
expression goto 32
function goto 33
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 19
2001-01-02 17:02:35 +01:00
statement : WHILE OPEN_PAR . conditional CLOSE_PAR statement
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 28
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
conditional goto 34
expression goto 32
function goto 33
2000-12-20 21:15:24 +01:00
state 20
2001-01-02 17:02:35 +01:00
statement : DO statement . WHILE OPEN_PAR conditional CLOSE_PAR END_STMT
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
WHILE shift 35
2000-12-20 21:15:24 +01:00
state 21
2000-12-08 21:51:13 +01:00
statement : PAUSE END_STMT . (6)
. reduce 6
2000-12-20 21:15:24 +01:00
state 22
2001-01-02 17:02:35 +01:00
statement : PRINT OPEN_PAR . expression CLOSE_PAR END_STMT
2000-12-08 21:51:13 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
expression goto 36
function goto 33
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 23
2000-12-08 21:51:13 +01:00
statement_list : statement_list . statement
statement : BEGIN_CS statement_list . END_CS
STOP shift 3
IF shift 4
2000-12-20 21:15:24 +01:00
WHILE shift 5
DO shift 6
PAUSE shift 7
PRINT shift 8
END_STMT shift 9
BEGIN_CS shift 10
2001-01-02 17:02:35 +01:00
END_CS shift 37
2000-12-20 21:15:24 +01:00
VARIABLE shift 11
FUNCTION shift 12
statement goto 13
assign_expression goto 14
variable goto 15
function goto 16
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 24
2000-12-15 21:29:33 +01:00
function : FUNCTION OPEN_PAR . $$1 CLOSE_PAR
2001-01-02 17:02:35 +01:00
$$1 : . (29)
2000-12-15 21:29:33 +01:00
2001-01-02 17:02:35 +01:00
. reduce 29
2000-12-15 21:29:33 +01:00
2001-01-02 17:02:35 +01:00
$$1 goto 38
2000-12-15 21:29:33 +01:00
2000-12-20 21:15:24 +01:00
state 25
2000-12-08 21:51:13 +01:00
statement : assign_expression END_STMT . (8)
. reduce 8
2000-12-20 21:15:24 +01:00
state 26
2001-01-02 17:02:35 +01:00
assign_expression : variable ASSIGN . expression
2000-12-08 21:51:13 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
expression goto 39
function goto 33
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 27
statement : function END_STMT . (14)
2000-12-15 21:29:33 +01:00
2000-12-20 21:15:24 +01:00
. reduce 14
2000-12-15 21:29:33 +01:00
2000-12-20 21:15:24 +01:00
state 28
2001-01-02 17:02:35 +01:00
expression : OPEN_PAR . expression CLOSE_PAR
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 28
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
expression goto 40
function goto 33
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 29
2001-01-02 17:02:35 +01:00
expression : VARIABLE . (23)
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
. reduce 23
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 30
2001-01-02 17:02:35 +01:00
expression : VALUE . (21)
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
. reduce 21
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 31
2001-01-02 17:02:35 +01:00
statement : IF OPEN_PAR conditional . CLOSE_PAR statement
statement : IF OPEN_PAR conditional . CLOSE_PAR statement ELSE statement
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
CLOSE_PAR shift 41
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 32
2001-01-02 17:02:35 +01:00
conditional : expression . EQUAL expression
conditional : expression . NOTEQUAL expression
conditional : expression . LESSTHAN expression
conditional : expression . GREATERTHAN expression
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
EQUAL shift 42
NOTEQUAL shift 43
LESSTHAN shift 44
GREATERTHAN shift 45
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 33
2001-01-02 17:02:35 +01:00
expression : function . (28)
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
. reduce 28
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
state 34
2001-01-02 17:02:35 +01:00
statement : WHILE OPEN_PAR conditional . CLOSE_PAR statement
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
CLOSE_PAR shift 50
2000-12-20 21:15:24 +01:00
state 35
2001-01-02 17:02:35 +01:00
statement : DO statement WHILE . OPEN_PAR conditional CLOSE_PAR END_STMT
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
OPEN_PAR shift 51
2000-12-20 21:15:24 +01:00
state 36
2001-01-02 17:02:35 +01:00
statement : PRINT OPEN_PAR expression . CLOSE_PAR END_STMT
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
CLOSE_PAR shift 52
2000-12-20 21:15:24 +01:00
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 37
2000-12-20 21:15:24 +01:00
statement : BEGIN_CS statement_list END_CS . (13)
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
. reduce 13
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 38
2000-12-15 21:29:33 +01:00
function : FUNCTION OPEN_PAR $$1 . CLOSE_PAR
2001-01-02 17:02:35 +01:00
CLOSE_PAR shift 53
2000-12-15 21:29:33 +01:00
2001-01-02 17:02:35 +01:00
state 39
assign_expression : variable ASSIGN expression . (15)
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
2000-12-20 21:15:24 +01:00
. reduce 15
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 40
expression : OPEN_PAR expression . CLOSE_PAR
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
CLOSE_PAR shift 54
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 41
statement : IF OPEN_PAR conditional CLOSE_PAR . statement
statement : IF OPEN_PAR conditional CLOSE_PAR . statement ELSE statement
2000-12-08 21:51:13 +01:00
STOP shift 3
IF shift 4
2000-12-20 21:15:24 +01:00
WHILE shift 5
DO shift 6
PAUSE shift 7
PRINT shift 8
END_STMT shift 9
BEGIN_CS shift 10
VARIABLE shift 11
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
statement goto 55
2000-12-20 21:15:24 +01:00
assign_expression goto 14
variable goto 15
function goto 16
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 42
conditional : expression EQUAL . expression
2000-12-08 21:51:13 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
expression goto 56
function goto 33
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 43
conditional : expression NOTEQUAL . expression
2000-12-08 21:51:13 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
expression goto 57
function goto 33
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 44
conditional : expression LESSTHAN . expression
2000-12-20 21:15:24 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
expression goto 58
function goto 33
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
state 45
conditional : expression GREATERTHAN . expression
2000-12-20 21:15:24 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
expression goto 59
function goto 33
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
state 46
expression : expression PLUS . expression
2000-12-08 21:51:13 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
expression goto 60
function goto 33
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 47
expression : expression SUBTRACT . expression
2000-12-20 21:15:24 +01:00
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
2000-12-20 21:15:24 +01:00
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
expression goto 61
function goto 33
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
state 48
expression : expression MULTIPLY . expression
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
expression goto 62
function goto 33
2000-12-22 18:10:46 +01:00
2001-01-02 17:02:35 +01:00
state 49
expression : expression DIVIDE . expression
2000-12-22 18:10:46 +01:00
OPEN_PAR shift 28
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
expression goto 63
function goto 33
2000-12-22 18:10:46 +01:00
2001-01-02 17:02:35 +01:00
state 50
statement : WHILE OPEN_PAR conditional CLOSE_PAR . statement
2000-12-20 21:15:24 +01:00
STOP shift 3
IF shift 4
WHILE shift 5
DO shift 6
PAUSE shift 7
PRINT shift 8
END_STMT shift 9
BEGIN_CS shift 10
VARIABLE shift 11
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
statement goto 64
2000-12-20 21:15:24 +01:00
assign_expression goto 14
variable goto 15
function goto 16
2001-01-02 17:02:35 +01:00
state 51
statement : DO statement WHILE OPEN_PAR . conditional CLOSE_PAR END_STMT
2000-12-20 21:15:24 +01:00
OPEN_PAR shift 28
VARIABLE shift 29
VALUE shift 30
FUNCTION shift 12
2001-01-02 17:02:35 +01:00
conditional goto 65
expression goto 32
function goto 33
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
state 52
statement : PRINT OPEN_PAR expression CLOSE_PAR . END_STMT
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
END_STMT shift 66
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 53
function : FUNCTION OPEN_PAR $$1 CLOSE_PAR . (30)
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
. reduce 30
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 54
expression : OPEN_PAR expression CLOSE_PAR . (22)
2000-12-15 21:29:33 +01:00
2001-01-02 17:02:35 +01:00
. reduce 22
2000-12-15 21:29:33 +01:00
2001-01-02 17:02:35 +01:00
55: shift-reduce conflict (shift 67, reduce 9) on ELSE
state 55
statement : IF OPEN_PAR conditional CLOSE_PAR statement . (9)
statement : IF OPEN_PAR conditional CLOSE_PAR statement . ELSE statement
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
ELSE shift 67
2000-12-08 21:51:13 +01:00
. reduce 9
2001-01-02 17:02:35 +01:00
state 56
conditional : expression EQUAL expression . (16)
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 16
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 57
conditional : expression NOTEQUAL expression . (17)
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 17
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 58
conditional : expression LESSTHAN expression . (18)
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 18
2000-12-08 21:51:13 +01:00
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
state 59
conditional : expression GREATERTHAN expression . (19)
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 19
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
60: shift-reduce conflict (shift 46, reduce 24) on PLUS
60: shift-reduce conflict (shift 47, reduce 24) on SUBTRACT
60: shift-reduce conflict (shift 48, reduce 24) on MULTIPLY
60: shift-reduce conflict (shift 49, reduce 24) on DIVIDE
state 60
expression : expression PLUS expression . (24)
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 24
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
61: shift-reduce conflict (shift 46, reduce 25) on PLUS
61: shift-reduce conflict (shift 47, reduce 25) on SUBTRACT
61: shift-reduce conflict (shift 48, reduce 25) on MULTIPLY
61: shift-reduce conflict (shift 49, reduce 25) on DIVIDE
state 61
expression : expression . PLUS expression
expression : expression SUBTRACT expression . (25)
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 25
2000-12-20 21:15:24 +01:00
2000-12-22 18:10:46 +01:00
2001-01-02 17:02:35 +01:00
62: shift-reduce conflict (shift 46, reduce 26) on PLUS
62: shift-reduce conflict (shift 47, reduce 26) on SUBTRACT
62: shift-reduce conflict (shift 48, reduce 26) on MULTIPLY
62: shift-reduce conflict (shift 49, reduce 26) on DIVIDE
state 62
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression MULTIPLY expression . (26)
expression : expression . MULTIPLY expression
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 26
2000-12-22 18:10:46 +01:00
2001-01-02 17:02:35 +01:00
63: shift-reduce conflict (shift 46, reduce 27) on PLUS
63: shift-reduce conflict (shift 47, reduce 27) on SUBTRACT
63: shift-reduce conflict (shift 48, reduce 27) on MULTIPLY
63: shift-reduce conflict (shift 49, reduce 27) on DIVIDE
state 63
expression : expression . PLUS expression
expression : expression . SUBTRACT expression
expression : expression . MULTIPLY expression
expression : expression DIVIDE expression . (27)
expression : expression . DIVIDE expression
PLUS shift 46
SUBTRACT shift 47
MULTIPLY shift 48
DIVIDE shift 49
. reduce 27
2000-12-22 18:10:46 +01:00
2001-01-02 17:02:35 +01:00
state 64
statement : WHILE OPEN_PAR conditional CLOSE_PAR statement . (11)
2000-12-20 21:15:24 +01:00
. reduce 11
2001-01-02 17:02:35 +01:00
state 65
statement : DO statement WHILE OPEN_PAR conditional . CLOSE_PAR END_STMT
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
CLOSE_PAR shift 68
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
state 66
statement : PRINT OPEN_PAR expression CLOSE_PAR END_STMT . (7)
2000-12-08 21:51:13 +01:00
. reduce 7
2001-01-02 17:02:35 +01:00
state 67
statement : IF OPEN_PAR conditional CLOSE_PAR statement ELSE . statement
2000-12-08 21:51:13 +01:00
STOP shift 3
IF shift 4
2000-12-20 21:15:24 +01:00
WHILE shift 5
DO shift 6
PAUSE shift 7
PRINT shift 8
END_STMT shift 9
BEGIN_CS shift 10
VARIABLE shift 11
FUNCTION shift 12
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
statement goto 69
2000-12-20 21:15:24 +01:00
assign_expression goto 14
variable goto 15
function goto 16
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
state 68
statement : DO statement WHILE OPEN_PAR conditional CLOSE_PAR . END_STMT
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
END_STMT shift 70
2000-12-20 21:15:24 +01:00
2001-01-02 17:02:35 +01:00
state 69
statement : IF OPEN_PAR conditional CLOSE_PAR statement ELSE statement . (10)
2000-12-08 21:51:13 +01:00
. reduce 10
2001-01-02 17:02:35 +01:00
state 70
statement : DO statement WHILE OPEN_PAR conditional CLOSE_PAR END_STMT . (12)
2000-12-20 21:15:24 +01:00
. reduce 12
2001-01-02 17:02:35 +01:00
State 55 contains 1 shift-reduce conflict
State 60 contains 4 shift-reduce conflicts
State 61 contains 4 shift-reduce conflicts
State 62 contains 4 shift-reduce conflicts
State 63 contains 4 shift-reduce conflicts
2000-12-08 21:51:13 +01:00
2001-01-02 17:02:35 +01:00
26 tokens, 10 nonterminals
31 grammar rules, 71 states