Giter Club home page Giter Club logo

Comments (2)

mike-lischke avatar mike-lischke commented on September 20, 2024

I tested the new "TS runtime", which is actually nothing more than some typings for the JS runtime. The only real Typescript code is in the generated parser + lexer files. As it is now this "TS runtime" is not usable for code that uses antlr4ts currently. Here are some of my findings:

  • Vocabulary implementation is missing. The vocabulary is essential.
  • No type definitions for any of the transition and action classes.
  • Many other type definitions are missing too (e.g. ATNType, LexerActionExecutor, LexerATNConfig, just to name a few).
  • Type definitions are incomplete (e.g. Recognizer.atn is not mentioned in the Recognizer typings and can hence not be imported etc. Often the typings do not completely mirror the (already incomplete) JS APIs.
  • Important fields/methods are missing like Token.EPSILON, ATNState.INVALID_STATE_NUMBER, RuleStartState.ruleIndex, Interval.addAll, IntervalSet.toArray and others.
  • For some reasons I cannot import any of the transition classes. VS Code is completely helpless too.

I'm currently working on a real Typescript runtime. Once this is finished I'll upgrade my ANTLR4 projects.

from antlr4-c3.

sobolewsk avatar sobolewsk commented on September 20, 2024

For anyone interested, here is a quick'n'dirty port to the ANTLR4 TS runtime: https://github.com/sobolewsk/antlr4-c3ts/tree/branches/antrlts-runtime

from antlr4-c3.

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.