Comments (4)
I found it really hard to make the improvements that I wanted with the old Jison/Yacc grammar.
Rewrote everything in PEG but it had really bad performance (probably not PEG:s fault but then I have sunk a lot of time into that).
So I ended up writing a handmade parser, and it turned out to be so nice to work with that it won in the end.
Glad you like the syntax, and sorry if the lack of grammar is a blocker.
I would love to see what you create using Nearly.
from nomnoml.
That makes a lot of sense. I do need to keep in mind my end goal and not get distracted by learning EBNF. Was the performance a matter of how many entities it was parsing? Or was it just slow from the get-go? Just wondering if there's a good number of entities to test with to see what it can handle.
from nomnoml.
One of the difficulties is that the syntax is not really context free.
In this example the character <
is interpreted in three different ways depending on where it is located.
[foo <abstract>] label <- [<state>bar]
Other languages of course solve this, usually in the tokenizer.
The performance problems were related to deeply nested souce code.
[a|[a|[a|[a|]]]]
You should definitely use the test suite - it covers pretty much all of the syntax.
from nomnoml.
Thanks for your help. I've ended up diverging from your language a bit. I'll send you a link when it's ready for presentation since nomnoml is a clear parent of it, if you're curious. Closing this for now though since there's no reason to leave it open.
from nomnoml.
Related Issues (20)
- ES6 imports HOT 2
- Add href to element HOT 2
- New parser compile error when greater than or less than utilized HOT 3
- New parser gives "expected ] but got end of file" HOT 2
- Weird spacing on simple layout HOT 1
- any guess for when the new 1.6.0 version will get published? HOT 4
- Using <span> css in table definitions HOT 3
- Add 'doubled' shape style HOT 2
- following snippet does not work with the new parser but works with the old one HOT 4
- Is it possible modify the table contents. HOT 1
- missing <end>e label in homepage sample
- support drag-and-drop and custom positioning of individual items? HOT 1
- Labels overlapping
- PNG export resolution is low HOT 1
- Classifier Style Problem with <frame> Visual HOT 3
- Support Google Fonts usage HOT 1
- Delegation connector for component internals HOT 1
- Text search not working for larger nomnoml diagrams HOT 1
- Parse error at line 2 column 35, expected "label" but got "[" HOT 1
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 nomnoml.