Open maxteufel opened 1 year ago
I work on a parser combinator library inspired by rusts nom here: https://github.com/michaellilltokiwa/fuzion/blob/lib/modules/nom/modules/nom/src/nom.fz https://github.com/michaellilltokiwa/fuzion/blob/lib/modules/nom/tests/nom/nom_test.fz
But some bugs in fuzion need to be fixed first for this to work.
@michaellilltokiwa I think using general purpose parser for this is overkill. It should be sufficient to work with string.startsWith, string.substring, and string.split.
I disagree, sorry :-D I think the string.startsWith() way is actually more complicated in most but the easiest cases.
Since we now support command line args in both backends (#156), perhaps we want to provide some features to easily parse these. C has
getopt(3)
, Go has theflag
package in the standard library, Python has theargparse
module in the standard library.