antlr4 syntax.
See original GitHub issue🐛 Bug Report
While antlr4 is a supported syntax in prism, it does not look like it’s supported in D2. This is likely due to the syntax not being included with D2. If this is the case, what is the best course of action?
To Reproduce
Enter this antlr4 snippet and use antlr4 or g4 per the prism instructions as the language:
grammar JSON;
json
: value
;
obj
: '{' pair (',' pair)* '}'
| '{' '}'
;
Expected behavior
Actual Behavior
Your Environment
packages.json
{
"name": "website",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"
},
"dependencies": {
"@docusaurus/core": "^2.0.0-alpha.58",
"@docusaurus/preset-classic": "^2.0.0-alpha.58",
"classnames": "^2.2.6",
"docusaurus-plugin-internaldocs-fb": "^0.3.3",
"react": "^16.8.4",
"react-dom": "^16.8.4"
},
"resolutions": {
"prism-react-renderer": "1.1.0"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
antlr4/lexer-rules.md at master - GitHub
The action conforms to the syntax of the target language. ANTLR copies the action's contents into the generated code verbatim; there is no...
Read more >ANTLR
What is ANTLR? ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured ...
Read more >An introduction to language lexing and parsing with ANTLR
ANTLR 4 allows you to define lexer and parser rules in a single combined grammar file. This makes it really easy to get...
Read more >The ANTLR Mega Tutorial - Federico Tomassetti
The definitive ANTLR mega tutorial on ANTLR4. ... It is called ANTLR4 grammar syntax support and is created by one of the main...
Read more >ANTLR4 grammar syntax support - Visual Studio Marketplace
Extension for Visual Studio Code - Language support for ANTLR4 grammar files. ... Syntax coloring for ANTLR grammars (.g and .g4 files).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reading the docs, swizzle is to be used when I add my own language support. I am trying to use an existing language supported by prism here.
It is enough, not sure if Prism somehow brings the language syntax at runtime or if it’s comes packages with all of them after all. it’s small enough (1.17K).