Skip to content

Commit a56638d

Browse files
committed
Add ELVM Parser
1 parent b442f76 commit a56638d

File tree

151 files changed

+56452
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+56452
-236
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[ Exit ]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[ PutC
2+
( Literal 42 )
3+
, Exit
4+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[ Mov "A"
2+
( Literal 43 )
3+
, PutC
4+
( Variable "A" )
5+
, Exit
6+
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[ Mov "A"
2+
( Literal 43 )
3+
, Mov "B"
4+
( Variable "A" )
5+
, PutC
6+
( Variable "B" )
7+
, Exit
8+
]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[ GetC "A"
2+
, PutC
3+
( Variable "A" )
4+
, GetC "B"
5+
, PutC
6+
( Variable "B" )
7+
, GetC "C"
8+
, PutC
9+
( Variable "C" )
10+
, Exit
11+
]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[ Mov "A"
2+
( Variable "l" )
3+
, Jmp "A"
4+
, PutC
5+
( Literal 78 )
6+
, Exit
7+
, Mark "l"
8+
, PutC
9+
( Literal 89 )
10+
, Exit
11+
]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[ Mov "B"
2+
( Literal 77 )
3+
, Store "B"
4+
( Literal 300 )
5+
, Load "A"
6+
( Literal 300 )
7+
, Load "A"
8+
( Literal 300 )
9+
, PutC
10+
( Variable "A" )
11+
, Mov "B"
12+
( Literal 69 )
13+
, Store "B"
14+
( Literal 30 )
15+
, Store "B"
16+
( Literal 30 )
17+
, Load "A"
18+
( Literal 30 )
19+
, PutC
20+
( Variable "A" )
21+
, Add "A"
22+
( Literal 8 )
23+
, PutC
24+
( Variable "A" )
25+
, Load "A"
26+
( Literal 556 )
27+
, Add "A"
28+
( Literal 10 )
29+
, PutC
30+
( Variable "A" )
31+
, Exit
32+
]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[ Mov "B"
2+
( Literal 77 )
3+
, Store "B"
4+
( Literal 300 )
5+
, Mov "C"
6+
( Literal 300 )
7+
, Load "A"
8+
( Variable "C" )
9+
, Load "A"
10+
( Variable "C" )
11+
, PutC
12+
( Variable "A" )
13+
, Mov "B"
14+
( Literal 69 )
15+
, Mov "C"
16+
( Literal 30 )
17+
, Store "B"
18+
( Variable "C" )
19+
, Store "B"
20+
( Variable "C" )
21+
, Load "A"
22+
( Variable "C" )
23+
, Load "A"
24+
( Variable "C" )
25+
, PutC
26+
( Variable "A" )
27+
, Add "A"
28+
( Literal 8 )
29+
, PutC
30+
( Variable "A" )
31+
, Load "A"
32+
( Literal 556 )
33+
, Add "A"
34+
( Literal 10 )
35+
, PutC
36+
( Variable "A" )
37+
, Exit
38+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[ PText
2+
, Mov "B"
3+
( Variable "val" )
4+
, Load "A"
5+
( Variable "B" )
6+
, PutC
7+
( Variable "A" )
8+
, Add "B"
9+
( Literal 1 )
10+
, Load "A"
11+
( Variable "B" )
12+
, PutC
13+
( Variable "A" )
14+
, Exit
15+
, PData Nothing
16+
, Mark "val"
17+
, PString "hi"
18+
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[ Mov "A"
2+
( Literal 33 )
3+
, Add "A"
4+
( Variable "A" )
5+
, PutC
6+
( Variable "A" )
7+
, Exit
8+
]

0 commit comments

Comments
 (0)