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
prg/**/*.ast
prg/**/*.out
prg/**/*.pins25

View File

@ -70,27 +70,3 @@ initializer -> INTCONST intconstmult | CHARCONST | STRINGCONST .
intconstmult -> MUL const | .
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;
}
StringBuilder builder = new StringBuilder();
while (buffChar != -1) {
if (buffChar == '\n' && !builder.toString().endsWith("--")) {
break;
}
builder.append((char) buffChar);
while (buffChar != '\n' && buffChar != -1) {
nextChar();
}