congo-cc / congo-parser-generator

The CongoCC Parser Generator, the Next Generation of JavaCC 21, which in turn was the next generation of JavaCC
https://discuss.congocc.org/
Other
33 stars 9 forks source link

Fix uptodate bug in Arithmetic build.xml #182

Closed alirazeen closed 4 months ago

alirazeen commented 4 months ago

This commit fixes the build.xml so that if either Arithmetic1.ccc or Arithmetic2.ccc is modified independently, everything is recompiled properly. As it stands now, changes to Arithmetic1.ccc alone will not retrigger a compile.

Hopefully I don't send another PR today to examples/Arithmetic and embarrass myself.

alirazeen commented 4 months ago
$ touch Arithmetic1.ccc && ant test
Buildfile: /Users/al/projects/congo-parser-generator/examples/arithmetic/build.xml

init:

parser-gen-arith1:

parser-gen-arith2:

compile:
    [javac] Compiling 20 source files

test:
     [java] Parsing arithmetic expression from the command line
     [java] Dumping the AST...
     [java] <Root (1, 1)-(1, 3)>
     [java]   <AdditiveExpression (1, 1)-(1, 3)>
     [java]     1
     [java]     +
     [java]     1
     [java]   EOF
     [java] The result is: 2.0

BUILD SUCCESSFUL