TestQueryParser

utest.TestQueryParser
See theTestQueryParser companion object
class TestQueryParser(input: String)

Parses query strings.

Fastparse grammar:

val quoted: P[String] = P(""" ~/ CharsWhile(_ != '"').! ~ """) val ident: P[String] = P(CharIn('a' to 'z', 'A' to 'Z', "_-").rep(1).!) val item: P[String] = P(quoted | ident) val chain: P[Any] = P(item.rep(1, sep="." ~/) ~ ("." ~/ parseCurlies).?) val commas: P[Any] = P(chain.rep(1, sep=","~/)) val curlies: P[Any] = P(commas | "{" ~/ curlies ~ "}")

But here written manually to avoid the dependency on FastParse.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type Parsed[T] = Either[String, (T, Int)]
type Trees = Seq[Tree[String]]

Value members

Concrete methods

def chain(index: Int): Parsed[Tree[String]]
def commas(index: Int): Parsed[Trees]
def curlies(index: Int): Parsed[Trees]
def item(index: Int): Parsed[String]
def repSep[T](index0: Int, p: Int => Parsed[T], sep: Char): Parsed[Seq[T]]
def treeify(s: Seq[String], end: Trees): Tree[String]

Concrete fields

val delimiters: Set[Char]