Comments (3)
I'll see what I can do. π Rather than modify EBNF's grammar, though, it'll be better to add a dedicated grammar for LEBNF instead. Lark's format is well-defined and uses a non-conflicting file extension, whereas ebnf.cson
attempts to accommodate every syntax variation that might be encountered in .ebnf
files (which rarely conform to ISO/IEC 14977).
I have no idea on how to write an atom grammar (I find it poorly documented on atom.io)
It's actually TextMate's grammar format, adopted by Atom/GitHub, VSCode, and Sublime Text. Each have different requirements on file format: Atom uses CSON/JSON, VSCode and TextMate use XML property lists, and Sublime uses YAML. Regardless of their representation, all TextMate-compatible grammars are structurally similar, and the ones you'll encounter are often converted from a TextMate bundle (except mine⦠I proudly pen them all from scratch).
Other than TextMate's grammar reference, the only other reliable source of info (that I know of) is this blog post. It covers several critical (but undocumented) details of writing a TMCG, and discusses the hacks necessary to work around TextMate's notorious lack of multiline pattern support.
from language-grammars.
Righto, all done! This covers everything in both the docs and Lark's own grammar definition. Here's a preview:
from language-grammars.
I've also submitted a PR to have Lark grammars supported/highlighted on GitHub. See github-linguist/linguist#5049.
from language-grammars.
Related Issues (5)
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 language-grammars.