I am learning Parser Combinators in scala and seeing different ways of parsing.I mainly see three different kind of parsers ie.RegexpParsers,StandardTokenParsers and JavaTokenParsers.I am new to parsing and not getting the idea how we will choose the suitable Parser according to our requirement.Can any one please explain how these different parsers work and when to use them.
I am learning Parser Combinators in scala and seeing different ways of parsing.I mainly
Share
RegexpParsersallow you to use RE values (typically in the form"re pattern".rbut equally any other Regex instance). There are no pre-defined lexical productions (tokens).JavaTokenParsersdefines lexical productions for Java tokens:decimalNumber,floatingPointNumber,stringLiteral,wholeNumber,ident(identifier).StandardTokenParsersdefines lexical productions “… for a simple, Scala-like language. It parses keywords and identifiers, numeric literals (integers), strings, and delimiters.” Its constituents are actually defined inStdLexical.