Changes for version 1.177

  • Added syntax %token = %/regexp/ meaning a contextual token. One that is returned only if expected by the syntax anañyzer.
    • %token then = %/(then)\b/ %token if = %/(if)(?!\s*=)/ %token ID = /([a-zA-Z_]\w*)/
    • See grammar t/PL_I_conflictContextualTokens.eyp
  • Provided syntax: %dummy token TUTU Meaning that the token will never be emited by the lexical generator. See t/dummytoken.eyp %syntactic token IF = /(?i:if)/ %syntactic token ELSE = /(?i:else)/ %syntactic token THEN = /(?i:then)/ %token EXPR = /(?i:(e))/ %token OTHERSTMT = /(?i:(o))/ %dummy token TUTU
  • Added to t/77lexicalanalyzergeneration.t a test that uses t/PL_I_conflictContextualTokens.eyp to check the syntax %token X = { code }
    • %token then = { $self->expects('then') and /\Gthen\b/gc and return ('then', 'then'); } %token if = { $self->expects('if') and /\Gif(?!\s*=)/gc and return ('if', 'if'); } %token ID = /([a-zA-Z_]\w*)/
    • See t/PL_I_conflictContextualTokens.eyp
  • Provided a higher level API for conflicts that can be solved using nested parsing: Cplusplusnested.eyp: %conflict decORexp decl? ID:DEC : ID:EXP
    • It means: Check for nested parser "decl" if success, reduce by 'ID:DEC', otherwise reduce by 'ID:EXP'
    • pascalnestedeyapp3_6.eyp: %conflict rORe range? ID:RANGE : ID:ENUM DebugDynamicResolution4.eyp: %conflict LD lastD? D:LAST : shift
      • It means: Check for nested parser "lastD" if success, reduce by 'D:LAST', otherwise shift
  • YYSetReduce can work without specifying the token set
  • YYSetShift can work without specifying the token set

Documentation

A Perl front-end to the Parse::Eyapp module
Tree Matching and Tree substitution: an introduction
Tutorial on Using Parse::Eyapp as a Data Generator for Testing
Solving ambiguities and fixing lexical, syntactic and semantic errors
Introduction to Default Actions and Grammar Reuse
A Perl front-end to the Parse::Eyapp module
An introduction to Parse::Eyapp
The Eyapp language reference manual
Introduction to the Eyapp language
Introduction to Translation Schemes in Eyapp
Compiler for Tree Regular Expressions

Modules

Bottom up parser generator
Miscellaneous support functions for Parse::Eyapp
The LR parser
The nodes of the Syntax Trees
The parser of Eyapp grammars
Support for Scope Analysis
Support for Using Parse::Eyapp as a Data Generator
Tree transformations
Tree transformation objects

Provides

in lib/Parse/Eyapp/Cleaner.pm
in lib/Parse/Eyapp/Grammar.pm
in lib/Parse/Eyapp/Lalr.pm
in lib/Parse/Eyapp/Node.pm
in lib/Parse/Eyapp/Options.pm
in lib/Parse/Eyapp/Output.pm
in lib/Parse/Eyapp/Treeregexp.pm
in lib/Parse/Eyapp/Unify.pm
in lib/Parse/Eyapp/_TreeregexpSupport.pm

Examples

Other files