3 ms·
Looks nice, I have a couple of questions: Does this use a single pass for the parser? Is there an EBNF spec? What sort of diagrams does it support? Thanks
by alexisread 2y ago
Looks nice, I have a couple of questions:
Does this use a single pass for the parser?
Is there an EBNF spec?
What sort of diagrams does it support?
Thanks
- zagap 2y agoThis is a specification, it does not declare how implementations work. At the moment only typescript implementation exists and here is PEG grammars from it: https://github.com/podlite/podlite/blob/main/packages/podlite-schema/src/grammar.pegjs https://github.com/podlite/podlite/blob/main/packages/podlit... At the moment it supports Mermaid diagrams: https://pod6.in/#p=%3Dbegin+Mermaid++%3Acaption%28%27Caption+of+diagram%27%29%0A++++graph+LR%0A++++++++++++A--%3EB%0A++++++++++++B--%3EC%0A++++++++++++C--%3EA%0A++++++++++++D--%3EC%0A%3Dend+Mermaid%0A https://pod6.in/#p=%3Dbegin+Mermaid++%3Acaption%28%27Caption...
- zagap 2y agoThe existing typescript implemetation builds a complete AST (Abstract Syntax Tree), over which middlewares are run in several passes. Yes, there are multiple passes over the tree. This is necessary, among other things, to build a table of contents (TOC). thank you
- alexisread 2y agoMight not work for my use case then. djot is single-pass so dovetails better with forth-style languages. I do like the blocks and mistake marking though :)
- austinjp 2y agoInteresting. Have you been using djot for anything substantial, like technical/academic publishing, large projects like entire books, or similar? How does it fare and what is your toolchain? Thanks in advance!
- alexisread 2y agoI'm trying to use it as part of a new forth-style language, hence the need for single-pass. I've found it as easy to use as markdown, but more regular ie. Well defined, which suits a language spec. The key parts for me are reference links for execution-thread documentation and ``` blocks to program literally, (and separate/scope comments // from documentation """) The toolchain as such is just part of the language- the compiler needs to parse djot. I'm not fully there though.