PEG Grammar
HashParam ← PageLabel? NamedValues PageLabel ← PageName ":" PageName ← String NamedValues ← Identifier "=" Value ("," Identifier "=" Value )* Value ← Array / Object / Boolean / Numeric / String Object ← "{" NamedValues? "}" Array ← "[" Value ("," Value)* "]" Boolean ← ( "true" / "false" ) !(Identifier) Numeric ← ( "0" / [1-9] ) [1-9]* ("." [0-9]+)? Identifier ← UnicodeLetter+ String ← (UnicodeLetter / "-" / "_" / "%" / [0-9])+ UnicodeLetter ← [ [:Lu:][:Ll:][:Lt:][:Lm:][:Lo:][:Nl:] ]
Options
{drop:['UnicodeLetter']}
Generated Parsing Code
Input to be Parsed
hello:foo=bar,id=13,ids=[17,42],foo={yes=true,no=false,maybe=maybe}
ParseTree