ptal / oak

A typed parser generator embedded in Rust code for Parsing Expression Grammars
Apache License 2.0
142 stars 14 forks source link

List of expressions #90

Open ptal opened 8 years ago

ptal commented 8 years ago

A list of expressions is defined by e % sep which is equivalent to e (sep e)* in term of parsing but not equivalent in term of types. Indeed the first expression will have the type Vec<E> while the second (E, Vec<E>) or (E, Vec<(E, Sep)>) if the separator has a type different from () or (^).