HackerPapers

arXiv:1405.4841cs.FL

Derivatives of Parsing Expression Grammars

Aaron Moss

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

This paper introduces a new derivative parsing algorithm for recognition of parsing expression grammars. Derivative parsing is shown to have a polynomial worst-case time bound, an improvement on the exponential bound of the recursive descent algorithm. This work also introduces asymptotic analysis based on inputs with a constant bound on both grammar nesting depth and number of backtracking choices; derivative and recursive descent parsing are shown to run in linear time and constant space on this useful class of inputs, with both the theoretical bounds and the reasonability of the input class validated empirically. This common-case constant memory usage of derivative parsing is an improvement on the linear space required by the packrat algorithm.

arXiv comments
In Proceedings AFL 2017, arXiv:1708.06226
Journal reference
EPTCS 252, 2017, pp. 180-194
DOI
doi:10.4204/EPTCS.252.18
Subjects
cs.FLFormal Languages and Automata Theory

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Oct 2014 to Oct 2014.

Comments linking this paper, per year.

Discussed in comments1 thread

    • I've been working on a derivative parsing algorithm for PEGs; it only uses memory proportional to the amount of backtracking and grammar nesting (i.e. about the same as recursive descent), but still gives a polynomial worst-case bound on time. An early draft of my paper on it is…

      BruceIVView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.