Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
cc19:scallion [2019/10/09 12:24] georg.schmid Typos |
cc19:scallion [2019/10/09 12:26] georg.schmid Typos |
||
---|---|---|---|
Line 91: | Line 91: | ||
==== Parsers and Grammars ==== | ==== Parsers and Grammars ==== | ||
- | As you will see, parsers built using parser combinators will look a lot like grammars. However, contrarily to grammars, parsers not only describe the syntax or your language, but also directly specify how to turn this syntax into a value. Also, as we will see, parser combinators have a richer vocabulary than your usual //BNF// grammars. | + | As you will see, parsers built using parser combinators will look a lot like grammars. However, unlike grammars, parsers not only describe the syntax of your language, but also directly specify how to turn this syntax into a value. Also, as we will see, parser combinators have a richer vocabulary than your usual //BNF// grammars. |
Interestingly, a lot of concepts that you have seen on grammars, such as ''%%FIRST%%'' sets and nullability can be straightforwardly transposed to parsers. | Interestingly, a lot of concepts that you have seen on grammars, such as ''%%FIRST%%'' sets and nullability can be straightforwardly transposed to parsers. | ||
Line 102: | Line 102: | ||
definition.first === Set(def, abstract, case) | definition.first === Set(def, abstract, case) | ||
</code> | </code> | ||
+ | |||
=== Nullability === | === Nullability === | ||