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
chooseMany (choose1Many): Potentially useful addition to the library. Choose from many where the terms may be out of order. Useful for parsing command line parameters and related.
lets1="b c a c c a d"lets2="d a b c"letpa= pstring "a".>> spaces
letpb= pstring "b".>> spaces
letpc= pstring "c".>> spaces
run (chooseMany [pa; pb; pc]) s1
>>valit:ParserResult<stringlist,unit>=Success:["a"; "c"; "b"]
run (chooseMany [pa; pb; pc]) s2
valit:ParserResult<stringlist,unit>=Success:[]
run (choose1Many [pa; pb; pc]) s2
>>valit:ParserResult<stringlist,unit>=
Failure:
Error in Ln:1 Col:1
d a b c
^
Expecting:'a','b'or'c'
With tail calls, the implementations should be fast. Not sure this code is at the level of production quality for FParsec so not creating a pull request.
chooseMany (choose1Many): Potentially useful addition to the library. Choose from many where the terms may be out of order. Useful for parsing command line parameters and related.
With tail calls, the implementations should be fast. Not sure this code is at the level of production quality for FParsec so not creating a pull request.
The text was updated successfully, but these errors were encountered: