MVP #25
Replies: 11 comments 42 replies
-
I've just finished ANTLR grammar lexer written in Kotlin: KvanTTT/antlr4#9 All tests are passed (and add new ones). The final code size is comparible to the size of the old ANTLR3 lexer's grammar. If compare to the generated ANTLR lexer, it's much smaller. Also, I'm sure it's more correct and brief. Feel free to use it. The next step includes writing ANTLR grammar parser in Kotlin but it's more complicated. I'm doing these things according to my strategy suggested in #24 Also, I wanted to figure out how Kotlin works alongside with Java and it works like a charm! |
Beta Was this translation helpful? Give feedback.
-
What do you mean by "no browser"? WasmGC is on by default in Chrome (Chromium-based browsers) and Firefox. Work in Safari is in-progress, a few days ago they merged 2 PRs, and now the nightly build passes over 99% of Kotlin/Wasm compiler tests. |
Beta Was this translation helpful? Give feedback.
-
StringTemplate is currently used to render the source code for the lexer and parser from a template plus string attributes, If StringTemplate is being dropped (see the comments here and here), what technology are you using in its place? |
Beta Was this translation helpful? Give feedback.
-
It seems to me that WASM is a new technology and there are things we need to figure out. Based on this assumption, I would tend towards maximizing the speed at which we can prototype and learn, accepting that this could lead to restart with a different approach in a couple of months, based on what we learn in the meantime. Tool-wise, @ericvergnaud indicates we can start with option 1 and move to option 2 later on. That seems to me the preferable path as it enables us to move quicker. Regarding the steps:
|
Beta Was this translation helpful? Give feedback.
-
@ftomassetti would you be kind enough to start looking into that ? I wouldn't want us to engage in a path only to restart at some point due to a licensing issue... |
Beta Was this translation helpful? Give feedback.
-
Yes the goal is to accelerate. We will obviously support Node and other browsers once they catch up with the WebAssembly specs, but the more I use Deno, the more I see that as a release-only concern. Deno supports TypeScript ootb and that removes so many problems, it's much more productive than Node. |
Beta Was this translation helpful? Give feedback.
-
Thanks for this in-depth analysis.
I wouldn’t be comfortable with part of the software using Apache and another part using BSD.
You are indeed encouraged to let Kotlin runtime authors know that their code would serve as the basis for antlr5 wasm runtime.
This specs repo will go public once we reach consensus on the MVP.
|
Beta Was this translation helpful? Give feedback.
-
Sorry, I keep hearing that you want to run the parser in a browser, but it sounded as though that is the only way this generated code is going to work.
Strictly speaking, you are right. But in the dozens of projects that I was lead or collaborator, we ended up placing implementation requirements in the requirements specification because it was considered a "feature change". I feel as though I'm not helpful in Antlr5 requirements or implementation. Instead, I will focus more on Saxon for parse tree query and refactoring with Trash/Antlr4. There are some questions I have as to whether it will work as replacement for the Xalan XPath2 engine, which I further modified and ported to C# for cross-document query and multiple DOMs (i.e., a partial parse tree). Unfortunately, Xalan does not implement XQuery, and it is no longer being maintained, so it can't work in the long run. |
Beta Was this translation helpful? Give feedback.
-
@antlr/antlr5 Gents, I've made this repo public. |
Beta Was this translation helpful? Give feedback.
-
@kaby76 I'm also thinking of creating:
|
Beta Was this translation helpful? Give feedback.
-
Probably a good idea for you guys to register the new domain: antlr5.org. That will give you more flexibility for creating URLs to a new lab, etc.. |
Beta Was this translation helpful? Give feedback.
-
@antlr/antlr5 ,
Gents,
there seems to be consensus re what the end product could look like, however the required tech stack is not available yet:
The purpose of this discussion is to outline what our MVP will be. It is a workable step towards our target, but also needs to be a working product, even if it only supports one language.
Tool-wise, since the JVM/GraalVM cannot yet execute the GC in WasmGC, we only have 2 options:
We need to decide on this. I personally believe we could switch to 2 post-MVP.
Runtime-wise, since the currently available execution platforms are V8 based, the only runtime for the MVP will be TypeScript.
Step-by-step, and assuming we postpone the WASM tool, here is how things would look like:
Feature-wise, here is what I'm thinking:
Some of these still need to be refined, but that should not prevent us from starting to build.
Awaiting your comments to amend and/or get cracking!
Beta Was this translation helpful? Give feedback.
All reactions