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
Currently we employ a per-rule macro expansion approach which has the benefit of being simpler and more focused than the alternative of defining a complete (or partial) parser in a single macro, similar to what is done in https://github.com/begeric/FastParsers.
It also has the benefit that the user directly controls all aspects of the parser class (inheritance, additional members, etc.) without a macro potentially getting in the way.
The disadvantage is that a per-rule macro expansion has only local knowledge and cannot "look into" other rule definitions, which prohibits catching things like #117 or performing cross-rule optimizations.
We need to evaluate whether parser-level macro expansion has a positive cost/benefit when compared with the current approach.
Also, it might be possible to publish the inner rule structure to the outside even with the per-rule macro approach by moving to structural types as rule macro results, thus potentially combining the benefits of both approaches.
The text was updated successfully, but these errors were encountered:
Currently we employ a per-rule macro expansion approach which has the benefit of being simpler and more focused than the alternative of defining a complete (or partial) parser in a single macro, similar to what is done in https://github.com/begeric/FastParsers.
It also has the benefit that the user directly controls all aspects of the parser class (inheritance, additional members, etc.) without a macro potentially getting in the way.
The disadvantage is that a per-rule macro expansion has only local knowledge and cannot "look into" other rule definitions, which prohibits catching things like #117 or performing cross-rule optimizations.
We need to evaluate whether parser-level macro expansion has a positive cost/benefit when compared with the current approach.
Also, it might be possible to publish the inner rule structure to the outside even with the per-rule macro approach by moving to structural types as rule macro results, thus potentially combining the benefits of both approaches.
The text was updated successfully, but these errors were encountered: