Inigo Montoya: You keep using that word "syntax tree". I do not think it means... #35
-
OK, my goal is not to make you guys rename all your stuff or cause you any kind of grief. I just want an rational, objective answer to this question: Are structures like Pandoc's "AST" and Unified's mdast technically/truly abstract syntax trees? The abstract part is correct. For example whether the heading was ATX or Setext in the source is abstracted away. But what makes them syntax trees? This is an important question for me because I'm also working on an abstract representation of document structure as an intermediate representation (IR) for handling Markdown as well as other source document formats. (It's quite possible after I get the POC working I re-implement as a Unified plugin). Naming it correctly is important because I want to offer it as a standard. I figure y'all are a good set to ask since its right there in your org name! 😉 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You seem to be interested in the word Syntax? If so, have you see: https://en.wikipedia.org/wiki/Syntax_(programming_languages)? If not, could you clarify? I’m also sensing that you‘re hinting that markup languages are not syntax, and only “programming” languages are? I don’t get why it’s important to disambiguate between those? Why should markup not be allowed? |
Beta Was this translation helpful? Give feedback.
-
yes.
Okay. |
Beta Was this translation helpful? Give feedback.
yes.
It is abstract in that the structure is preserved, but specific tokens may not be.
It is syntax as in a rule set for interpreting a sequence of characters.
It is a tree because the result meets the conditions of the tree data structure.
Okay.
Tokens, Abstract Syntax Trees, Control Flow Graphs, Static Single Assignment are all intermediate representations.
So it is true that unified and the unist-based ASTs are also intermediate representations, but intermediate representation is not a particularly useful way of …