Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/944705.944727acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Polish parsers, step by step

Published: 25 August 2003 Publication History

Abstract

We present the derivation of a space efficient parser combinator library: the constructed parsers do not keep unnecessary references to the input, produce online results and efficiently handle ambiguous grammars. The underlying techniques can be applied in many contexts where traditionally backtracking is used.We present two data types, one for keeping track of the progress of the search process, and one for representing the final result in a linear way. Once these data types are combined into a single type, we can perform a breadth-first search, while returning parts of the result as early as possible.

References

[1]
J. Fokker. Functional parsers. In J. Jeuring and E. Meijer, editors, Advanced Functional Programming, number 925 in Lecture Notes in Computer Science, pages 1--52. Springer-Verlag, Berlin, 1995.
[2]
G. Hutton and E. Meijer. Monadic parser combinators. Journal of Functional Programming, 8(4):437--444, July 1998.
[3]
D. J. P. Leijen and H. J. M. Meijer. Parsec: Direct style monadic parser combinators for the real world. UU-CS 2001-35, Department of Computer Science, P.O.Box 80.089, 3508 TB Utrecht, the Netherlands, 2001.
[4]
S. D. Swierstra. Combinator parsers: From toys to tools. In G. Hutton, editor, Electronic Notes in Theoretical Computer Science, volume 41. Elsevier Science Publishers, 2001.
[5]
S. D. Swierstra and P. R. Azero Alcocer. Fast, error correcting parser combinators: a short tutorial. In J. Pavelka, G. Tel, and M. Bartosek, editors, SOFSEM'99 Theory and Practice of Informatics, 26th Seminar on Current Trends in Theory and Practice of Informatics, volume 1725 of LNCS, pages 111--129, November 1999.
[6]
S. D. Swierstra and L. Duponcheel. Deterministic, error-correcting combinator parsers. In J. Launchbury, E. Meijer, and T. Sheard, editors, Advanced Functional Programming, volume 1129 of LNCS-Tutorial, pages 184--207. Springer-Verlag, 1996.
[7]
E. Visser. Scannerless generalized-lr parsing. P 9707, Programming Research Group, University of Amsterdam, July 1997.
[8]
P. L. Wadler. How to replace failure by a list of successes. In J. Jouannaud, editor, Functional Programming Languages and Computer Architecture, volume 201 of LNCS, pages 113--128. Springer-Verlag, 1985.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '03: Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
August 2003
310 pages
ISBN:1581137567
DOI:10.1145/944705
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 38, Issue 9
    September 2003
    289 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/944746
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 August 2003

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. GLR parsing
  2. Polish representation
  3. ambiguous grammars
  4. breadth-first search
  5. online results
  6. parser combinators

Qualifiers

  • Article

Conference

ICFP03
Sponsor:

Acceptance Rates

ICFP '03 Paper Acceptance Rate 24 of 95 submissions, 25%;
Overall Acceptance Rate 333 of 1,064 submissions, 31%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)7
  • Downloads (Last 6 weeks)0
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media