f# - What to choose fsyacc/fslex or FParsec? -
i need parse simple dsl language following:
import "library.txt" def <int, bool, byte> main(int param1, bool param2) { var = f4(param1); // or var d = f1(f2(f3(f4(param1)))); var b = f3(a); var c = f2(b); var d = f1(c); return <d, param2, b0>; }
what suitable tool parse such kind of language?
lex/yacc better complete languages complicated grammars. parsec faster work when have short semi-simple tasks. think case, lex/yacc more suitable.
Comments
Post a Comment