gkappler / CombinedParsers.jl

Compiled parser combinators and regular expressions in pure julia
MIT License
78 stars 10 forks source link

`ParserCombinator.Delayed` equivalent? #26

Closed chengchingwen closed 3 years ago

chengchingwen commented 3 years ago

There is a Delayed type in ParserCombinator.jl which allow us to define a loop in the grammar. What do we use in CombinedParser to achieve the same functionality?

gkappler commented 3 years ago

You can use Either or @syntax, see e.g. similar to ParserCombinator arithmetics in CombinedParser arithmetics example or the json example in docs.

chengchingwen commented 3 years ago

@gkappler Thanks, I also have some questions about the syntax macro posted in #21. Could you take a look at them?