Some Aspects of Parsing Expression Grammar

  • Authors:
  • Roman R. Redziejowski

  • Affiliations:
  • (Correspd.: Ceremonimästarvägen 10, SE-181 40 Lidingö, Sweden) Giraf's Research. roman.redz@swipnet.se

  • Venue:
  • Fundamenta Informaticae - Concurrency Specification and Programming (CS&P)
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Parsing Expression Grammar (PEG) is a new way to specify syntax, by means of a topdown processwith limited backtracking. It can be directly transcribed into a recursive-descent parser. The parser does not require a separate lexer, and backtracking removes the usual LL(1) constraint. This is convenient for many applications, but there are two problems: PEG is not well understood as a language specification tool, and backtracking may result in exponential processing time. The paper consists of two parts that address these problems. The first part is an attempt to find out the language actually defined by a given parsing expression. The second part reports measurements of backtracking activity in a PEG-derived parser for the programming language C.