scala-parser-combinators
scala-parser-combinators copied to clipboard
simple combinator-based parsing for Scala. formerly part of the Scala standard library, now a separate community-maintained module
We have a parser that inherits from both `JavaTokenParsers` and `PackratParsers`; and it turns out that the `.parse()` method that the former provides (via `RegexParsers`) is incompatible with the latter....
Hi, The `scala.util.parsing.combinator` library should provide a way of turning on case insensitive matches; having to prefix every string with a (?i) isn't ideal. E.g., `"""(?iu)\|H""".r`, just ends up cluttering...
The stringLiteral function in scala.util.parsing.combinator.!JavaTokenParsers tries to parse String literals with Unicode escape sequence in them ```scala def stringLiteral: Parser[String] = ("\""+"""([^"\p{Cntrl}\\]|\\[\\/bfnrt]|\\u[a-fA-F0-9]{4})*"""+"\"").r ``` However, such Unicode escapes can occur elsewhere,...
The current parser combinators library is flexible but lacks the ability to easily define new combinators. For example, in a grammar that supports JavaTokensParser.wholeNumber and JavaTokensParser.floatingPointNumber literals and an e...
Since all Readers provider by parser combinators framework use PagedSeq inside, using those parsers for working with large files seems impossible - because PagedSeq will not release already parsed elements....
I've isolated a 3-rule pattern, where I'd expect the parser to succeed for a given input, but it fails instead. The sample grammar: ``` RuleA ::= RuleB. RuleB ::= IDENTIFIER...
ParseResult and its subtype are members of scala.util.parsing.combinator.Parsers. Why? This limits the ability to write code using ParseResult without any added benefit as far as I can see. E.g. I...
It would be nice to add the bits of code from chapter 33 of "Programming in Scala" as tests to be sure we don't break compatibility (too much) with the...
Hi all, I've created a fork which adds completion support to the library, which allows providing as-you-type autocomplete or TAB-completion experiences: https://github.com/jchapuis/scala-parser-combinators.git In a nutshell, additions are: - ` def...
Hi, The parser combinators works wonderfully, except for a minor tweak I'd like to add: I would like to constrain the type of position data structure in my parser pipeline....