CACrown ArchivesThe cinema collection
Menu
Research dossier · General Reference

Parser Grammar Engine

Perl 6 rule compiler/interpreter for the Parrot virtual machine

Cross-disciplinary reference desk with index cards, atlas, dictionary and catalogue
General referenceInterpretive dossier study · Crown Archives visual atlas
Record originEnglish Wikipedia
Text licenseCC BY-SA 4.0
Source revisionJan 28, 2026
Entity authorityQ3325088
Source-derived summary

The Parser Grammar Engine (PGE, originally the Parrot Grammar Engine) is a compiler and runtime system for Raku rules for the discontinued Parrot virtual machine. PGE uses these rules to convert a parsing expression grammar into Parrot bytecode. It is therefore compiling rules into a program, unlike most virtual machines and runtimes, which store regular expressions in a secondary internal format that is then interpreted at runtime by a regular expression engine. The rules format used by PGE can express any regular expression and most formal grammars, and as such it forms the first link in the compiler chain for all of Parrot's front-end languages.

When executed, the bytecode generated by PGE will parse text as described in the input rules, generating a parse tree. The parse tree can be manipulated directly, or fed into the next stage of the Parrot compiler toolchain to generate an abstract syntax tree (AST) from which code can be generated; if the grammar describes a programming language.

History

Originally named P6GE and written in C, PGE was translated to native Parrot and renamed not long after its initial release in November 2004. Its author is Patrick R. Michaud. PGE was written to reduce the amount of work needed to implement a compiler on Parrot. It was also written to allow Perl 6 to easily self-host, though current Pugs development no longer uses PGE as its main rules back-end in favor of a native engine named PCR.

Internals

PGE combines three styles of parsing:

Raku rules

an operator-precedence parser

custom parse subroutines

The primary form is Raku rules, so a PGE rule might look like this for an addition-only grammar:

The operator precedence parser allows an operator table to be built and used directly in a Perl 6 rule style parser like so:

This accomplishes the same goal of defining a simple, addition-only grammar, but does so using a combination of a Raku style regex/rules for term and number and a shift-reduce optable for everything else.

Editorial summary

This brief starts where responsible research should: with the source description of “Parser Grammar Engine” as perl 6 rule compiler/interpreter for the Parrot virtual machine. Everything that follows is an evidence route, not borrowed authority.

Editorial reviewA practical starting point whose main value is the path it opens into stronger specialist and primary sources. The current lead gives the account dated anchors—2004—that can be checked directly. The selected authority fields contribute no independent date. The account is most persuasive where Parser, Grammar and Engine can be independently traced.
Editorial analysis

Why this record matters

The subject matters to the general reference register because the source frames it as perl 6 rule compiler/interpreter for the Parrot virtual machine. Its deeper value depends on whether names, dates, institutions and citations support that framing.

Evidence profile

Named sources, stable identifiers and responsible institutions provide the strongest route from overview to verifiable evidence. The source revision retrieved here is dated Jan 28, 2026. The linked authority identifier is Q3325088. None of the 0 selected statements returned an explicit reference. The first chronological checks are 2004.

Critical limits

The absence of detail may reflect summary conventions rather than a lack of surviving documentation. The source lead contains qualifying language; that uncertainty should survive quotation, summary and reuse. Authority statements aid reconciliation but still require their own references, qualifiers and ranks to be checked.

How to read it

Use the entry as an orientation point, then follow its citations and revision history. Names, dates and institutional relationships should be checked against the original record.

Best used for
  • Subject orientation
  • Search vocabulary
  • Locating named sources
Verify next

The closest primary source, responsible institution and strongest cited specialist reference.

Three-step research path

  1. Establish the record: confirm the title “Parser Grammar Engine”, its source revision and the description used here.
  2. Expand the search: follow Parser Grammar Engine primary sources, Parser Grammar Engine archive and Parser research across catalogues and specialist indexes.
  3. Test the account: compare the strongest cited source with the responsible institution’s current record and note any disagreement.

Questions for further research

  1. Which source most directly establishes the central claim about “Parser Grammar Engine”?
  2. What terminology or title could unlock a more precise catalogue search?
  3. Which cited source is closest to the event, object or claim?
Subject index

Search terms from this dossier

Source & attribution

This entry incorporates text from Parser Grammar Engine” on English Wikipedia. Contributors are listed in the page history. Text is available under the Creative Commons Attribution-ShareAlike 4.0 License. Selected authority identifiers and statements are retrieved from Wikidata under CC0; their references and qualifiers remain part of the verification path.