Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21c1b387ae8cf3e

Jump to content

Talk:Packrat parser

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 9 days ago by SweetOleDee in topic Example in "Syntax" section

The phrase "In computing..." has been removed, as it implies a greater ubiquity of the term "packrat parser" than has yet been evidenced in the literture. This is a fairly recent advancement.

-- QTJ 20:16, 13 October 2006 (UTC)Reply

Figure in section "Syntax"

[edit]

The "example" subsection ends with a figure in the middle of the text. This figure should be put properly in a figure box and referenced (or not) in the text Cellomario (talk) 12:42, 7 July 2023 (UTC)Reply

Overall a very well written page, especially the part about memoization techniques. The only suggestion that I can make is that the average reader would benefit from a more divulgative approach, both in the text and in the references Cellomario (talk) 13:01, 7 July 2023 (UTC)Reply

Review

[edit]

The article is clear and well written. The main aspects of the topic are understandable by someone with no particular expertise in the area. Fdrc.Mtll (talk) 14:31, 7 July 2023 (UTC)Reply

Review

[edit]

The description of the Packrat parser is very detailed and provides a useful example to understand the underlying algorithm.

mscuttari (talk) 14:55, 7 July 2023 (UTC)Reply

Example in "Syntax" section

[edit]

The grammar given in the "Example" subsection doesn't seem to work:

Without a cut-off it accepts every input string. Adding a wrapper rule like doesn't work, because then inputs like are rejected.

You can see this by roughly tracking the execution:

  1. input: the wrapper with runs.
    1. left: eventually runs: consumes initial , runs on ,
      1. left: eventually runs: consumes initial , runs on ,
        1. left: eventually succeeds, consumes all remaining input, returns.
      2. no input left: can't match the final ,
      3. left: runs instead, matches , returns.
    2. left: consumes , returns.
  2. left: some input remains, so wrapper rejects the palindrome.

So to me it looks like at least in this particular case consumes only from the whole input string.

Can somebody correct the example? Alkiryk (talk) 13:20, 9 December 2025 (UTC)Reply

You've made a mistake in your execution, when S is run on 'aaaa' it runs recursively on 'aa' which clearly succeeds, and it then consumes the first and last a. SweetOleDee (talk) 13:14, 18 July 2026 (UTC)Reply