/
parser2.txt
73 lines (65 loc) · 2.22 KB
/
parser2.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
Input: fna FnB fNc FND fna$ fna% fnword# fnhello$ fnindex%
0: DefFuncN None |fna|
4: DefFuncN None |FnB|
8: DefFuncN None |fNc|
12: DefFuncN None |FND|
16: DefFuncN String |fna$|
21: DefFuncN Integer |fna%|
26: DefFuncN Double |fnword#|
34: DefFuncN String |fnhello$|
43: DefFuncN Integer |fnindex%|
51: Operator Op None EOL
Input: fna( FnB( fNc(FND( fna$(fna%( fnword#( fnhello$( fnindex%
0: DefFuncP () None |fna(|
5: DefFuncP () None |FnB(|
10: DefFuncP () None |fNc(|
14: DefFuncP () None |FND(|
19: DefFuncP () String |fna$(|
24: DefFuncP () Integer |fna%(|
30: DefFuncP () Double |fnword#(|
39: DefFuncP () String |fnhello$(|
49: DefFuncN Integer |fnindex%|
57: Operator Op None EOL
Input: a b(c$ D# asdf$ qwer( zxcv Asdf% QWER%( Nbb_34$( h_544_4#(
0: NoParen None |a|
2: Paren () None |b(|
4: NoParen String |c$|
7: NoParen Double |D#|
10: NoParen String |asdf$|
16: Paren () None |qwer(|
22: NoParen None |zxcv|
27: NoParen Integer |Asdf%|
33: Paren () Integer |QWER%(|
40: Paren () String |Nbb_34$(|
49: Paren () Double |h_544_4#(|
58: Operator Op None EOL
Input: LET PRINT end then xor Abs(CHR$(val( end if left$ left$(
0: Command Op Let
4: Command Op Print
10: Command Op End
14: Command Op Then
19: Operator Op Integer Xor
23: IntFuncP () Double Abs
27: IntFuncP () String Chr
32: IntFuncP () Double Val
37: Command Op EndIf
44: NoParen String |left$|
50: IntFuncP () String Left
56: Operator Op None EOL
Input: rem this should be a comment
0: Command Op Rem | this should be a comment|
28: Operator Op None EOL
Input: rem:this should be a comment
0: Command Op Rem |:this should be a comment|
28: Operator Op None EOL
Input: rem-this should be a comment
0: Command Op Rem |-this should be a comment|
28: Operator Op None EOL
Input: fn fn( fn1 fn1( fn_ fn_(
0: NoParen None |fn|
3: Paren () None |fn(|
7: NoParen None |fn1|
11: Paren () None |fn1(|
16: NoParen None |fn_|
20: Paren () None |fn_(|
24: Operator Op None EOL