[grammar] update

This commit is contained in:
2021-04-13 11:25:39 +05:30
parent 88109924ed
commit ae57a1bcf2
2 changed files with 5 additions and 3 deletions

View File

@@ -61,14 +61,14 @@ Eg.
## Setup oddities (dev)
1. Copy `antlr-4.8-complete.jar` to `./thirdparty/antlr`. (Required only if grammar has to be updated)
2. Generate parsers to `./libs/generated` or use VSCode with the ANTLR extension.
1. Generate parsers to `./libs/generated` or use VSCode with the ANTLR extension or use a downloaded ANTLR JAR.
## Todo (Tentative)
- [ ] Grammar
- [X] Number shorthand
- [X] Loop statements
- [X] Ignore rest
- [ ] Shorthand segments
- [X] Processing
- [X] Translate to bf

View File

@@ -68,7 +68,6 @@ outputStmt
NEWLINE: '\n' -> skip;
COMMENT: '//' ~[\r\n]* '\r'? '\n'? -> channel(HIDDEN);
ML_COMMENT: '/*' .*? '*/' ->channel(HIDDEN);
WS: [ \r\n] -> skip;
DEF: '#';
LOOPSTART: '[';
LOOPEND:']';
@@ -81,3 +80,6 @@ DEC: '-';
INC: '+';
LEFT: '<';
RIGHT: '>';
EVERYTHING_ELSE: . ->channel(HIDDEN);
WS: [ \r\n] -> skip;