Results 1 -
1 of
1
Functional-Logic Parsers In TOY
, 1998
"... Parsing has been a traditional workbench for showing the virtues of declarative programming. Both logic and functional programming claim the ability of writing parsers in a natural and concise way. We address here the task from a functional-logic perspective. By modelling parsers as non-deterministi ..."
Abstract
- Add to MetaCart
Parsing has been a traditional workbench for showing the virtues of declarative programming. Both logic and functional programming claim the ability of writing parsers in a natural and concise way. We address here the task from a functional-logic perspective. By modelling parsers as non-deterministic functions we achieve a very natural manner of building parsers, which combines the nicest properties of the functional and logic approaches. In particular, we are able to easily define within our framework parsers in a style very close to the `monadic parsers' of functional programming, but without any syntactic overhead. In a different direction we show that, if the functional-logic setting permits higher-order patterns while defining functions, parsers can be freely manipulated as data. This allows programming useful metalevel analysis or transformations, like discovering if the grammar corresponding to a given parser is LL(1). Finally, we sketch the potential application to parsing of f...

