Comments (2)
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 theRecognizer
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.
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)
- Java port-> NPE happen when followSets contains FollowSetWithPath with null following member HOT 1
- symbolWithContextSync causing Maximum call stack size exceeded HOT 2
- `followSetsByATN` constuctor name conflicts HOT 1
- Downgrade tsconfig target version until ES2020 HOT 1
- Add C++ port build checks HOT 3
- Fix C++ port behavior divergence with reference implementation HOT 4
- Distribute C++ port as a library HOT 1
- Make C++ port thread safe HOT 1
- [Question] Antlr-c3 with antlr4-ng runtime, issue with parser.getVocabulary() HOT 2
- How to use with plain JavaScript? HOT 2
- CodeCompleteCore constructor now references getVocabulary is this correct or should it be vocabulary HOT 2
- function to convert editor cursor position to token position HOT 1
- Symbol Tabel HOT 3
- About using esbuild to building HOT 3
- the library ist going to infinity loop HOT 1
- [Bug]: Unexpected behaviour in getAllSymbolsSync of ScopeSymbol
- Add command to esbuild HOT 2
- Autocompleting empty string causes error HOT 1
- Add .cjs output to package HOT 1
- Option to choose the parser rule for which we need the candidates HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antlr4-c3.