-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputParsing_main_pdf2_test.txt
106 lines (94 loc) · 2.72 KB
/
outputParsing_main_pdf2_test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
METHOD_BODY -> STATEMENT_LIST
STATEMENT_LIST -> STATEMENT STATEMENT_LIST_DASH
STATEMENT -> DECLARATION
DECLARATION -> PRIMITIVE_TYPE 'id' ';'
PRIMITIVE_TYPE -> 'int'
Matched token class: 'int' token lexeme: int
Matched token class: 'id' token lexeme: sum
Error: Unexpected token
Line: 1
Class: ','
Lexeme: ,
Insert ';' to the input and match it.
Error: Unexpected token
Line: 1
Class: ','
Lexeme: ,
STATEMENT_LIST_DASH -> STATEMENT STATEMENT_LIST_DASH
STATEMENT -> ASSIGNMENT
ASSIGNMENT -> 'id' 'assign' EXPRESSION ';'
Matched token class: 'id' token lexeme: count
Error: Unexpected token
Line: 1
Class: ','
Lexeme: ,
Insert 'assign' to the input and match it.
Error: Unexpected token
Line: 1
Class: ','
Lexeme: ,
EXPRESSION -> SIMPLE_EXPRESSION BUFFER1
SIMPLE_EXPRESSION -> BUFFER2 SIMPLE_EXPRESSION_DASH
BUFFER2 -> TERM
TERM -> FACTOR TERM_DASH
FACTOR -> 'id'
Matched token class: 'id' token lexeme: pass
Error: Unexpected token
Line: 1
Class: ','
Lexeme: ,
Error: Unexpected token
Line: 1
Class: 'id'
Lexeme: mnt
TERM_DASH -> '\L'
SIMPLE_EXPRESSION_DASH -> '\L'
BUFFER1 -> '\L'
Matched token class: ';' token lexeme: ;
STATEMENT_LIST_DASH -> STATEMENT STATEMENT_LIST_DASH
STATEMENT -> WHILE
WHILE -> 'while' '(' EXPRESSION ')' '{' STATEMENT '}'
Matched token class: 'while' token lexeme: while
Matched token class: '(' token lexeme: (
EXPRESSION -> SIMPLE_EXPRESSION BUFFER1
SIMPLE_EXPRESSION -> BUFFER2 SIMPLE_EXPRESSION_DASH
BUFFER2 -> TERM
TERM -> FACTOR TERM_DASH
FACTOR -> 'id'
Matched token class: 'id' token lexeme: pass
TERM_DASH -> '\L'
SIMPLE_EXPRESSION_DASH -> '\L'
BUFFER1 -> 'relop' SIMPLE_EXPRESSION
Matched token class: 'relop' token lexeme: !=
SIMPLE_EXPRESSION -> BUFFER2 SIMPLE_EXPRESSION_DASH
BUFFER2 -> TERM
TERM -> FACTOR TERM_DASH
FACTOR -> 'num'
Matched token class: 'num' token lexeme: 10
TERM_DASH -> '\L'
SIMPLE_EXPRESSION_DASH -> '\L'
Matched token class: ')' token lexeme: )
Matched token class: '{' token lexeme: {
STATEMENT -> ASSIGNMENT
ASSIGNMENT -> 'id' 'assign' EXPRESSION ';'
Matched token class: 'id' token lexeme: pass
Matched token class: 'assign' token lexeme: =
EXPRESSION -> SIMPLE_EXPRESSION BUFFER1
SIMPLE_EXPRESSION -> BUFFER2 SIMPLE_EXPRESSION_DASH
BUFFER2 -> TERM
TERM -> FACTOR TERM_DASH
FACTOR -> 'id'
Matched token class: 'id' token lexeme: pass
TERM_DASH -> '\L'
SIMPLE_EXPRESSION_DASH -> 'addop' TERM SIMPLE_EXPRESSION_DASH
Matched token class: 'addop' token lexeme: +
TERM -> FACTOR TERM_DASH
FACTOR -> 'num'
Matched token class: 'num' token lexeme: 1
TERM_DASH -> '\L'
SIMPLE_EXPRESSION_DASH -> '\L'
BUFFER1 -> '\L'
Matched token class: ';' token lexeme: ;
Matched token class: '}' token lexeme: }
STATEMENT_LIST_DASH -> '\L'
Matched token class: '$' token lexeme: '$'