Comments (5)
I would also love this. A lot of economy on typing the source. Of course the source will have to be pre-processed before parsing with the present parser... I have not found a JS transpiler to achieve this...
from nomnoml.
the advantage of using a transpiler would be that we can keep the present way of writing the source and add a second, more terse, version - without changing the grammar.
from nomnoml.
While I think this syntax is compatible, I would avoid adding more control characters to the language.
Semicolon already means linebreak when writing text inside a classifier and in the root scope. Having it mean something else when next to a classifier is probably a slippery slope towards trouble...
But the idea for a transpiler is interesting!
from nomnoml.
@skanaar I have already tried changing the nomnoml grammar for this and the problem was exactly where you expected: conflict between SEP and ";"
The problem with the transpiler is that we need to know the breakdown of association to re-write the source correctly.
An idea is to consider a middle ground:
[a]-[b];--[c];->[d]
can be
[a]-[b]
;--[c]
;->[d]
[a]-[b]*-[c]*-[d]
can be
[a]-[b]
*-[c]
*-[d]
and [foo]-[bar],[baz],[fighter],[bang]
can be written as
[foo]-[bar]
,[baz]
,[fighter]
,[bang]
It is still a much shorter source and changes to classnames have to be done in less places (should an update be necessary)
the changes are in association:
association
: class IDENT class
| rep class
| oper IDENT class
also:
rep : ","
oper
: "*"
| ";"
Also something about the SEP and IDENT, probably
from nomnoml.
Closing this as additional control characters will probably cause more trouble than it is worth.
from nomnoml.
Related Issues (20)
- 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 HOT 1
- 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
- What happened to the formal grammar? HOT 4
- Text search not working for larger nomnoml diagrams HOT 1
- Parse error at line 2 column 35, expected "label" but got "[" HOT 2
- Creating groups HOT 1
- nomnoml.com : Diagrams not rendering HOT 2
- Incorrect file name handling HOT 5
- large margins for russian text 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 nomnoml.