FParsec Parses Unordered Articles

I want to analyze some grammar as follows

OUTPUT data
GROUPBY key
TO location
USING object

the order of proposals is GROUPBY TO USINGallowed to be changed, but each proposal may occur no more than once.

Is there a convenient or built-in way to parse this in FParsec? I read a few questions and answers that mention the Haskell Parsec permutation. FParsec doesn't seem to have a permutation. If so, then why should I build a permutation in FParsec?

+4
source share
1 answer

I don’t think FParsec has a permutation parser. I see several directions that you could take, though.

  • , , @FuleSnabel, , , . , . , , AST , .

  • choice. , , , .

  • , , . many, choice , . , , , , , , .

  • , , , , .

+3

Source: https://habr.com/ru/post/1652750/


All Articles