Please use this identifier to cite or link to this item:
https://hdl.handle.net/20.500.11851/6887
Title: | Indentation-Sensitive Parsing for Parsec (conference Object) | Authors: | Adams, Michael D. Agacan, Ömer S. |
Keywords: | Parsing Parsec Indentation sensitivity Layout Offside rule |
Publisher: | Assoc Computing Machinery | Abstract: | Several popular languages including Haskell and Python use the indentation and layout of code as an essential part of their syntax. In the past, implementations of these languages used ad hoc techniques to implement layout. Recent work has shown that a simple extension to context-free grammars can replace these ad hoc techniques and provide both formal foundations and efficient parsing algorithms for indentation sensitivity. However, that previous work is limited to bottom-up, LR(k) parsing, and many combinator-based parsing frameworks including Parsec use top-down algorithms that are outside its scope. This paper remedies this by showing how to add indentation sensitivity to parsing frameworks like Parsec. It explores both the formal semantics of and efficient algorithms for indentation sensitivity. It derives a Parsec-based library for indentation-sensitive parsing and presents benchmarks on a real-world language that show its efficiency and practicality. | URI: | https://doi.org/10.1145/2775050.2633369 https://hdl.handle.net/20.500.11851/6887 |
ISSN: | 0362-1340 1558-1160 |
Appears in Collections: | Bilgisayar Mühendisliği Bölümü / Department of Computer Engineering Scopus İndeksli Yayınlar Koleksiyonu / Scopus Indexed Publications Collection WoS İndeksli Yayınlar Koleksiyonu / WoS Indexed Publications Collection |
Show full item record
CORE Recommender
WEB OF SCIENCETM
Citations
8
checked on Nov 2, 2024
Page view(s)
54
checked on Dec 23, 2024
Google ScholarTM
Check
Altmetric
Items in GCRIS Repository are protected by copyright, with all rights reserved, unless otherwise indicated.