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
It would be convenient to define parsers outside of TAG for use within it. This would allow users to easily adjust the behavior of a parser for an evolving format (ex. https://github.com/lum-ai/odinson).
Plan
To support this we'd need to discuss how a custom parser should be registered with TAG. Perhaps it should be passed in the config object (ex. {"odin": mycustomParseFunction}, where mycustomParseFunction returns data.)
The Parser constructor and helper functions in parse/parse.js will also need to be modified to work over a dynamic set of parsers instead of (or in addition to) the statically-defined ones TAG currently supports.
The parser system as currently written is based on classes, and Parser reads directly from each parser object's .data (e.g., from this.odin.data in the parseOdin() function) property. We may want to consider switching to a purely functional approach to support custom parsers.
The text was updated successfully, but these errors were encountered:
It would be convenient to define parsers outside of TAG for use within it. This would allow users to easily adjust the behavior of a parser for an evolving format (ex. https://github.com/lum-ai/odinson).
Plan
To support this we'd need to discuss how a custom parser should be registered with TAG. Perhaps it should be passed in the config object (ex.
{"odin": mycustomParseFunction}
, wheremycustomParseFunction
returnsdata
.)The
Parser
constructor and helper functions inparse/parse.js
will also need to be modified to work over a dynamic set of parsers instead of (or in addition to) the statically-defined ones TAG currently supports.The parser system as currently written is based on classes, and
Parser
reads directly from each parser object's.data
(e.g., fromthis.odin.data
in theparseOdin()
function) property. We may want to consider switching to a purely functional approach to support custom parsers.The text was updated successfully, but these errors were encountered: