You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is really interesting! Out of curiosity, have you ever explored Prolog (the language)? Based on the structure and layout of grammar.js, it seems like you could probably represent the CSTML parser/tree as a Prolog DCG without much difficulty. I was actually exploring something similar a while back, representing C syntax in a DCG form, but it had a different goal - I was looking at translating C source into Prolog source.
Even if you don't end up using Prolog as a bootstrap/implementation language, it might not be a bad idea to experiment with describing the CSTML grammar as a DCG - they're more powerful and less verbose than an equivalent EBNF notation, so it's a good halfway point between a structure fully defined by its implementation, like this one, and the kind of set-in-stone representation you could use while writing a formal specification.
The text was updated successfully, but these errors were encountered:
This is really interesting! Out of curiosity, have you ever explored Prolog (the language)? Based on the structure and layout of grammar.js, it seems like you could probably represent the CSTML parser/tree as a Prolog DCG without much difficulty. I was actually exploring something similar a while back, representing C syntax in a DCG form, but it had a different goal - I was looking at translating C source into Prolog source.
Even if you don't end up using Prolog as a bootstrap/implementation language, it might not be a bad idea to experiment with describing the CSTML grammar as a DCG - they're more powerful and less verbose than an equivalent EBNF notation, so it's a good halfway point between a structure fully defined by its implementation, like this one, and the kind of set-in-stone representation you could use while writing a formal specification.
The text was updated successfully, but these errors were encountered: