I am trying to implement a method arguments parser with FParsec.
I was wondering if there is some already implemented feature in FParsec itself that'd aid me on this purpose? I ask this as FParsec provides tooling when dealing with operator precedence, so there might be something for this too.
Parsing the opening and closing braces is pretty straight-forward. The headache lies in dealing with the following 3 cases that can happen:
Method arguments can consist of:
- no arguments,
- one argument,
- several arguments (all comma separated). keep in mind the last argument cannot be preceded by a comma!
I already have some clues on how to implement this by myself in case there is not any built-in feature, namely with the <|> operator and stream copying, but I'd like to stay away from that kind of low level stuff if possible.