Abstract
Parser combinator libraries represent parsers as functions and, using higher-order functions, define a DSL of combinators allowing users to quickly put together programs capable of handling complex recursive grammars. When moving to total functional languages such as Agda, these programs cannot be directly ported: there is nothing in the original definitions guaranteeing termination. In this paper, we will introduce a 'guarded' modal operator acting on types and show how it allows us to give more precise types to existing combinators thus guaranteeing totality.
Original language | English |
---|---|
Pages | 45-59 |
Number of pages | 15 |
Publication status | Published - 12 Feb 2018 |
Event | Vingt-neuviemes Journees Francophones des Langages Applicatifs, JFLA 2018 - 29th French-Speaking Conference on Applicative Languages, JFLA 2018 - Banyuls-sur-Mer, France Duration: 24 Jan 2018 → 27 Jan 2018 |
Conference
Conference | Vingt-neuviemes Journees Francophones des Langages Applicatifs, JFLA 2018 - 29th French-Speaking Conference on Applicative Languages, JFLA 2018 |
---|---|
Country/Territory | France |
City | Banyuls-sur-Mer |
Period | 24/01/18 → 27/01/18 |
Keywords
- total parser combinators
- higher-order functions
- total functional languages