Hi!
When trying to parse some legacy code the following line is causing a syntax error:
240 ACCEPT ARCH-ENT2 AT 1060 ON ESCAPE EXIT PROGRAM STOP RUN.
gnuCOBOL compiles the file with no error.
I include the stack trace below.
Thanks in advance,
Exception in thread "main" java.lang.RuntimeException: syntax error in line 240:28 no viable alternative at input 'ARCH-ENT2 AT'
at io.proleap.cobol.asg.runner.ThrowingErrorListener.syntaxError(ThrowingErrorListener.java:20)
at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:282)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:121)
at io.proleap.cobol.Cobol85Parser.identifier(Cobol85Parser.java:47388)
at io.proleap.cobol.Cobol85Parser.acceptStatement(Cobol85Parser.java:25212)
at io.proleap.cobol.Cobol85Parser.statement(Cobol85Parser.java:24806)
at io.proleap.cobol.Cobol85Parser.sentence(Cobol85Parser.java:24606)
at io.proleap.cobol.Cobol85Parser.paragraph(Cobol85Parser.java:24542)
at io.proleap.cobol.Cobol85Parser.paragraphs(Cobol85Parser.java:24451)
at io.proleap.cobol.Cobol85Parser.procedureSection(Cobol85Parser.java:24375)
at io.proleap.cobol.Cobol85Parser.procedureDivisionBody(Cobol85Parser.java:24317)
at io.proleap.cobol.Cobol85Parser.procedureDivision(Cobol85Parser.java:23377)
at io.proleap.cobol.Cobol85Parser.programUnit(Cobol85Parser.java:881)
at io.proleap.cobol.Cobol85Parser.compilationUnit(Cobol85Parser.java:784)
at io.proleap.cobol.Cobol85Parser.startRule(Cobol85Parser.java:728)
at io.proleap.cobol.asg.runner.impl.CobolParserRunnerImpl.parseFile(CobolParserRunnerImpl.java:190)
at io.proleap.cobol.asg.runner.impl.CobolParserRunnerImpl.analyzeFile(CobolParserRunnerImpl.java:94)
at io.proleap.cobol.asg.runner.impl.CobolParserRunnerImpl.analyzeFile(CobolParserRunnerImpl.java:86)
at mx.unam.iingen.srcpi.dmm.COBOLDataStructures.(COBOLDataStructures.java:56)
at mx.unam.iingen.srcpi.dmm.DataModelMatcher.readDescriptionFile(DataModelMatcher.java:130)
at mx.unam.iingen.srcpi.dmm.DataModelMatcher.main(DataModelMatcher.java:95)
Hi @stanmoon, GnuCOBOL is not covered by ProLeap COBOL parser. This is due to the amount of COBOL extensions in GnuCOBOL, which currently we cannot cover due to resource constraints.
Hi! When trying to parse some legacy code the following line is causing a syntax error: 240 ACCEPT ARCH-ENT2 AT 1060 ON ESCAPE EXIT PROGRAM STOP RUN. gnuCOBOL compiles the file with no error. I include the stack trace below. Thanks in advance,
Exception in thread "main" java.lang.RuntimeException: syntax error in line 240:28 no viable alternative at input 'ARCH-ENT2 AT' at io.proleap.cobol.asg.runner.ThrowingErrorListener.syntaxError(ThrowingErrorListener.java:20) at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41) at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544) at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:282) at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:121) at io.proleap.cobol.Cobol85Parser.identifier(Cobol85Parser.java:47388) at io.proleap.cobol.Cobol85Parser.acceptStatement(Cobol85Parser.java:25212) at io.proleap.cobol.Cobol85Parser.statement(Cobol85Parser.java:24806) at io.proleap.cobol.Cobol85Parser.sentence(Cobol85Parser.java:24606) at io.proleap.cobol.Cobol85Parser.paragraph(Cobol85Parser.java:24542) at io.proleap.cobol.Cobol85Parser.paragraphs(Cobol85Parser.java:24451) at io.proleap.cobol.Cobol85Parser.procedureSection(Cobol85Parser.java:24375) at io.proleap.cobol.Cobol85Parser.procedureDivisionBody(Cobol85Parser.java:24317) at io.proleap.cobol.Cobol85Parser.procedureDivision(Cobol85Parser.java:23377) at io.proleap.cobol.Cobol85Parser.programUnit(Cobol85Parser.java:881) at io.proleap.cobol.Cobol85Parser.compilationUnit(Cobol85Parser.java:784) at io.proleap.cobol.Cobol85Parser.startRule(Cobol85Parser.java:728) at io.proleap.cobol.asg.runner.impl.CobolParserRunnerImpl.parseFile(CobolParserRunnerImpl.java:190) at io.proleap.cobol.asg.runner.impl.CobolParserRunnerImpl.analyzeFile(CobolParserRunnerImpl.java:94) at io.proleap.cobol.asg.runner.impl.CobolParserRunnerImpl.analyzeFile(CobolParserRunnerImpl.java:86) at mx.unam.iingen.srcpi.dmm.COBOLDataStructures.(COBOLDataStructures.java:56)
at mx.unam.iingen.srcpi.dmm.DataModelMatcher.readDescriptionFile(DataModelMatcher.java:130)
at mx.unam.iingen.srcpi.dmm.DataModelMatcher.main(DataModelMatcher.java:95)