Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
cc19:scallion [2019/07/11 14:27] romain created |
cc19:scallion [2019/07/11 14:29] romain |
||
---|---|---|---|
Line 24: | Line 24: | ||
==== Setup ==== | ==== Setup ==== | ||
- | |||
- | Before we can dive into parser combinators, we | ||
In Scallion, parsers are defined within a trait called ''%%Parsers%%''. This trait takes as parameters two types: | In Scallion, parsers are defined within a trait called ''%%Parsers%%''. This trait takes as parameters two types: | ||
Line 187: | Line 185: | ||
If you were to omit it, a ''%%StackOverflow%%'' exception would be triggered during the initialisation of your ''%%Parser%%'' object. | If you were to omit it, a ''%%StackOverflow%%'' exception would be triggered during the initialisation of your ''%%Parser%%'' object. | ||
- | The ''%%recursive%%'' combinator in itself does not change the behaviour of the underlying parser in any ways. It is just there to //tie the knot//((See [[https://stackoverflow.com/questions/357956/explanation-of-tying-the-knot|a good explanation of what //tying the knot// means in the context of lazy languages.]] | + | The ''%%recursive%%'' combinator in itself does not change the behaviour of the underlying parser in any ways. It is just there to //tie the knot//((See [[https://stackoverflow.com/questions/357956/explanation-of-tying-the-knot|a good explanation of what tying the knot means in the context of lazy languages.]] |
)). | )). | ||