Code Monkey home page Code Monkey logo

Comments (10)

julianthome avatar julianthome commented on June 16, 2024

Hello Larry,

would it be possible for you to share your g4 file so that I can reproduce and fix the bug?

Thank you very much and kind regards,
Julian

from inmemantlr.

larrymelia avatar larrymelia commented on June 16, 2024

from inmemantlr.

julianthome avatar julianthome commented on June 16, 2024

Hello Larry,

sorry, I could not find an attached file. Could you sent it via E-mail to me ([email protected]).

Thanks a lot for your help and kind regards,
Julian

from inmemantlr.

larrymelia avatar larrymelia commented on June 16, 2024

from inmemantlr.

julianthome avatar julianthome commented on June 16, 2024

Hello Larry,

thanks for the link. I've just checked the grammar with inmemantlr-v1.3.1 and with vanilla ANTLR v4.6. In both cases, I do get the same error, though.

cd /tmp
sudo curl -O http://www.antlr.org/download/antlr-4.6-complete.jar
export CLASSPATH=".:/tmp/antlr-4.6-complete.jar:$CLASSPATH"
alias antlr4='java -jar /tmp/antlr-4.6-complete.jar'
antlr4 GenScalaFacadesFromTypescript.g4
javac -classpath '/tmp/antlr-4.6-complete.jar:.' *.java

The response is:

GenScalaFacadesFromTypescriptLexer.java:156: error: cannot find symbol
			return !strictMode;
			        ^
  symbol:   variable strictMode
  location: class GenScalaFacadesFromTypescriptLexer
1 error

After removing the {!strictMode} reference in the g4 file, it worked for both inmemantlr and vanilla ANTLR.

I was wondering if you could provide me some information on how you've got the grammar working with vanilla ANTLR.

Thank you very much and kind regards,
Julian

from inmemantlr.

larrymelia avatar larrymelia commented on June 16, 2024

from inmemantlr.

larrymelia avatar larrymelia commented on June 16, 2024

from inmemantlr.

julianthome avatar julianthome commented on June 16, 2024

Ah I see. I think the ECMA script grammar from the grammar-v4 package might be a useful resource as well since they also use the strict member of the Lexer class.

The grammars-v4 cases are handled by the JUnit class TestExternalGrammars (the ECMA script test case can be found in the function testEcmaScript).

Kind regards,
Julian

from inmemantlr.

larrymelia avatar larrymelia commented on June 16, 2024

from inmemantlr.

julianthome avatar julianthome commented on June 16, 2024

Hi Larry,

ok, thanks a lot for your feedback. In case there are other problems, please do not hesitate to contact me and/or open another issue.

Best wishes and kind regards,
Julian

from inmemantlr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.