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
[The Decapodes DSL is] built using a syntactic macro and a hand-written parser. The core problem with this technique lies in three areas.
Because Julia’s compiler has the unicode star symbol [for example] defined as an operator… we are confined to the set precedence and properties that Julia assumes the star operator to have.
The second problem lies in maintainability. Because we build a hand-written parser for each
DSL, developers have to deal with the complexity and bugs that arise from a complicated
program such as a parser. A small design change could cause hours of head-aches as one
attempts to modify a heavily recursive program, dealing with the mundane bugs that arise from
such.
The third problem lies in extendability. Because each DSL requires a hand-written parser, we are
unable to reuse core components to quickly and easily create new DSLs.
The solution is as follows. Our team will develop parsing expression grammars that will replace
the hand-written parsers and utilize string macros over syntactic macros. A parsing expression
grammar or a PEG is a formal grammar used for recognizing strings in the language defined
(“Parsing expression grammar”, 2024). PEGs are defined by a collection of parsing expressions
that can reference each other. Through this, we can rewrite an existing parser as a PEG where
each recursive parsing function is a parsing expression.
Taken from Dylan and Christian’s design doc:
To be closed by PR associated with https://github.com/cscaff/DiagrammaticEquations.jl/tree/PEG-DSL
The text was updated successfully, but these errors were encountered: