Parseur, easy, fast and small typescript parsing
Parseur is a tiny (1.7k uglified + gziped) parsing library meant to be used with Typescript.
It is fairly fast, and was designed so that writing grammars would be concise and neatly typed.
It functions by combining parsers and executing them on an array of tokens.
Seqsilent_rule1, , ...// A sequence of rules.// Unless put in objects, rules matched are not part of the result, which// is an object.Eitherrule1, rule2, ...// Returns the first matchRepeatrule /* or */ rule.Repeat// Repeat a rule zero or more times, like *OneOrMorerule /* or */ rule.OneOrMore// Repeat a rule one or more times, like +SeparatedByrule, sep /* or */ rule.SeparatedBysep// A Helper to repeat a rule one or more times with each match separated// by a separator.Optrule// Match a rule and return its result if found or return `null` if not.Notrule// Negative look-ahead