Hello!
I've been using Gold a lot and I very happy about it. Well, usually, I
used it for small grammars and it worked perfect until I've developed
grammar for OCL (available here:
http://students.info.uaic.ro/~andrei.arusoaie/grammar/ocl-2.grm)
The problem is that I cannot the generated tables .cgt or .egt in
Java. The error I receive when I'm trying to load .cgt file is the
following:
Exception in thread "main" java.lang.NullPointerException
at goldengine.java.GOLDParser.loadTables(GOLDParser.java:582)
at goldengine.java.GOLDParser.loadCompiledGrammar(GOLDParser.java:
613)
at parser.generic.Parser.parse(Parser.java:25)
at metamodel.parser.MetamodelParser.parse(MetamodelParser.java:57)
at main.Executor.execute(Executor.java:77)
at main.Main.main(Main.java:42)
A similar error I get for the .egt:
Exception in thread "main" java.lang.NullPointerException
at
com.creativewidgetworks.goldparser.engine.Parser.lookaheadDFA(Parser.java:
542)
at
com.creativewidgetworks.goldparser.engine.Parser.produceToken(Parser.java:
854)
at
com.creativewidgetworks.goldparser.engine.Parser.parse(Parser.java:
662)
at
com.creativewidgetworks.goldparser.parser.GOLDParser.parseSourceStatements(GOLDParser.java:
311)
at
com.creativewidgetworks.goldparser.parser.GOLDParser.parseSourceStatements(GOLDParser.java:
292)
at Ocl.executeProgram(Ocl.java:37)
at Ocl.main(Ocl.java:80)
It's true that that I have some shift-reduce conflicts but those are
solved by the Builder and I can generate the tables. I've tried to use
the tables in C# and it worked, but I can only use Java in my
project. :)
Thanks,
Andrei Arusoaie