GithubHelp home page GithubHelp logo

Comments (3)

muggins avatar muggins commented on May 24, 2024

Code generated for Java will of necessity vary from code generated for Objective-C. The question is does the code generated for Objective-C generate a lexer and parser that correctly parse the grammar. When I ran the combined test, its output matched the expected output.

from antlr3-objc2.0-runtime.

johndemic avatar johndemic commented on May 24, 2024

Ah OK, I was under the impression I had to use Java to generate the code. I'll dig through the source and try to figure out how to do the code generation from Xcode. Thanks again for your promptness in getting to these!

from antlr3-objc2.0-runtime.

muggins avatar muggins commented on May 24, 2024

I wanted to clarify the code generation issue, the grammar is generated from java or ANTLRWorks but the language specifier ObjC must be specified in the grammar file.
"options {

backtrack = true;
memoize = true;
language = ObjC;
output = AST;
ASTLabelType= ANTLRCommonTree;
}"
Like the foregoing example. The code generated for the ObjC runtime will be different than the code generated for the "C" runtime and for the Java runtime. If you want to use ANTLRWorks on your mac, you have to rebuild it with the OBJC runtime stringtemplates. If you are using Java you have to have copied the ObjC stringTemplates folder into the ANTLR folder runtime. Check the README here and the ANTLR website for detailed instructions.

from antlr3-objc2.0-runtime.

Related Issues (14)

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.