Skip to content

Commit 3b78398

Browse files
committed
piccode: Latest working build. There were a lot of bugs
1 parent 850064e commit 3b78398

15 files changed

+1736
-735
lines changed

src/main/java/org/piccode/antlr4/PiccodeScript.interp

Lines changed: 5 additions & 2 deletions
Large diffs are not rendered by default.

src/main/java/org/piccode/antlr4/PiccodeScript.tokens

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ IF=37
3838
ELSE=38
3939
MODULE=39
4040
DO=40
41-
NUMBER=41
42-
STRING=42
43-
DOT=43
44-
LINE_COMMENT=44
45-
BLOCK_COMMENT=45
46-
ID=46
47-
WS=47
41+
USE=41
42+
RETURN_TOK=42
43+
NUMBER=43
44+
STRING=44
45+
DOT=45
46+
LINE_COMMENT=46
47+
BLOCK_COMMENT=47
48+
ID=48
49+
WS=49
4850
'+'=1
4951
'-'=2
5052
'*'=3
@@ -85,4 +87,6 @@ WS=47
8587
'else'=38
8688
'module'=39
8789
'do'=40
88-
'.'=43
90+
'use'=41
91+
'return'=42
92+
'.'=45

src/main/java/org/piccode/antlr4/PiccodeScriptBaseListener.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,6 @@ public class PiccodeScriptBaseListener implements PiccodeScriptListener {
181181
* <p>The default implementation does nothing.</p>
182182
*/
183183
@Override public void exitArg(PiccodeScriptParser.ArgContext ctx) { }
184-
/**
185-
* {@inheritDoc}
186-
*
187-
* <p>The default implementation does nothing.</p>
188-
*/
189-
@Override public void enterLiteral_expr(PiccodeScriptParser.Literal_exprContext ctx) { }
190-
/**
191-
* {@inheritDoc}
192-
*
193-
* <p>The default implementation does nothing.</p>
194-
*/
195-
@Override public void exitLiteral_expr(PiccodeScriptParser.Literal_exprContext ctx) { }
196184
/**
197185
* {@inheritDoc}
198186
*

src/main/java/org/piccode/antlr4/PiccodeScriptBaseVisitor.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,6 @@ public class PiccodeScriptBaseVisitor<T> extends AbstractParseTreeVisitor<T> imp
111111
* {@link #visitChildren} on {@code ctx}.</p>
112112
*/
113113
@Override public T visitArg(PiccodeScriptParser.ArgContext ctx) { return visitChildren(ctx); }
114-
/**
115-
* {@inheritDoc}
116-
*
117-
* <p>The default implementation returns the result of calling
118-
* {@link #visitChildren} on {@code ctx}.</p>
119-
*/
120-
@Override public T visitLiteral_expr(PiccodeScriptParser.Literal_exprContext ctx) { return visitChildren(ctx); }
121114
/**
122115
* {@inheritDoc}
123116
*

src/main/java/org/piccode/antlr4/PiccodeScriptLexer.interp

Lines changed: 7 additions & 1 deletion
Large diffs are not rendered by default.

src/main/java/org/piccode/antlr4/PiccodeScriptLexer.java

Lines changed: 127 additions & 120 deletions
Large diffs are not rendered by default.

src/main/java/org/piccode/antlr4/PiccodeScriptLexer.tokens

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ IF=37
3838
ELSE=38
3939
MODULE=39
4040
DO=40
41-
NUMBER=41
42-
STRING=42
43-
DOT=43
44-
LINE_COMMENT=44
45-
BLOCK_COMMENT=45
46-
ID=46
47-
WS=47
41+
USE=41
42+
RETURN_TOK=42
43+
NUMBER=43
44+
STRING=44
45+
DOT=45
46+
LINE_COMMENT=46
47+
BLOCK_COMMENT=47
48+
ID=48
49+
WS=49
4850
'+'=1
4951
'-'=2
5052
'*'=3
@@ -85,4 +87,6 @@ WS=47
8587
'else'=38
8688
'module'=39
8789
'do'=40
88-
'.'=43
90+
'use'=41
91+
'return'=42
92+
'.'=45

src/main/java/org/piccode/antlr4/PiccodeScriptListener.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,6 @@ public interface PiccodeScriptListener extends ParseTreeListener {
149149
* @param ctx the parse tree
150150
*/
151151
void exitArg(PiccodeScriptParser.ArgContext ctx);
152-
/**
153-
* Enter a parse tree produced by {@link PiccodeScriptParser#literal_expr}.
154-
* @param ctx the parse tree
155-
*/
156-
void enterLiteral_expr(PiccodeScriptParser.Literal_exprContext ctx);
157-
/**
158-
* Exit a parse tree produced by {@link PiccodeScriptParser#literal_expr}.
159-
* @param ctx the parse tree
160-
*/
161-
void exitLiteral_expr(PiccodeScriptParser.Literal_exprContext ctx);
162152
/**
163153
* Enter a parse tree produced by {@link PiccodeScriptParser#expr_stmt}.
164154
* @param ctx the parse tree

0 commit comments

Comments
 (0)