Compare commits

..

No commits in common. "2025-predrok/01-multiline-comments" and "master" have entirely different histories.

4 changed files with 3 additions and 37 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ out/
*.zip *.zip
prg/**/*.ast prg/**/*.ast
prg/**/*.out prg/**/*.out
prg/**/*.pins25

View File

@ -69,28 +69,4 @@ restinits -> COMMA initializer restinits | .
initializer -> INTCONST intconstmult | CHARCONST | STRINGCONST . initializer -> INTCONST intconstmult | CHARCONST | STRINGCONST .
intconstmult -> MUL const | . intconstmult -> MUL const | .
const -> INTCONST | CHARCONST | STRINGCONST . const -> INTCONST | CHARCONST | STRINGCONST .
--------------------------------------------------------------------
//LEFT ASOC.
exp0 = exp0 op other | other
|
v
exp0 = other exp0'
exp0' = op other exp0' | .
//RIGHT ASOC.
exp0 = other op exp0 | other
|
v
exp0 = other exp0'
exp0' = op exp0 | .

View File

@ -1,5 +0,0 @@
// line1 --
line2 -----x
line3
fun main() = 0

View File

@ -247,13 +247,7 @@ public class LexAn implements AutoCloseable {
return; return;
} }
StringBuilder builder = new StringBuilder(); while (buffChar != '\n' && buffChar != -1) {
while (buffChar != -1) {
if (buffChar == '\n' && !builder.toString().endsWith("--")) {
break;
}
builder.append((char) buffChar);
nextChar(); nextChar();
} }