Rust Peg Versions Save

Parsing Expression Grammar (PEG) parser generator for Rust

0.5.6

5 years ago

Fix for libsyntax OneVector rename

0.5.5

6 years ago

Fix for FileName change in libsyntax API

0.5.4

6 years ago

Fixes

  • Fix operator capture in #infix parser (#165)

0.5.3

7 years ago

Fixes

  • Fix infix parsers in grammars using context arguments (#162)

0.5.2

7 years ago

New Features

Fixes

  • [peg-syntax-ext] Update for rust-nightly-2017-04-28

0.5.1

7 years ago

Fixes

  • Fix line comments after types in grammar source (#152)
  • Fix error position reporting for source with DOS-style newlines (#153)

0.5.0

7 years ago

Changes

  • Change #[pub] rule_name = ... syntax to pub rule_name = .... The old syntax is retained for backwards compatibility, but pub is now a reserved keyword and cannot be used as an identifier.

New features

  • Add rule templates
  • Add experimental #infix syntax for parsing binary infix expressions by precedence climbing.
  • Allow delimited-repeat with range bounds **<n,m>.
  • Add x*<{count}> syntax for a repeat bounded by a Rust expression.
  • Add #quiet<e> and #expected("msg") expressions for improved error reporting.
  • Allow as in use statements to match Rust syntax.

Fixes

  • Fix a bug in error reporting of & and ! expressions.
  • Avoid type errors if a rule returns a result, but the result is not used.
  • Error when using a nonexistent rule, rather than generating Rust code that doesn't compile.

0.4.0

7 years ago

Migrating from 0.3

  • If you were using the syntax extension, replace peg = "0.3.0" with peg-syntax-ext = "0.4.0" in your Cargo.toml's [dependencies] section. The library name in #![plugin(peg_syntax_ext)] remains the same. Consider moving to the build script for compatibility with Rust stable.
  • The match_str variable has been removed in favor of the $(expr) syntax. Replace [0-9]+ { match_str.parse().unwrap() } with n:$([0-9]+) { n.parse().unwrap() }
  • start_pos and pos variables have been removed. Use #position as an expression, which returns a usize offset into the source string. Replace foo:x { Span(start_pos, pos, foo) } with start:#position foo:x end:#position { Span(start, end, foo) }
  • The \u2029 unicode hex escape syntax has been removed, as it has long-since been removed from Rust. Use \u{2029} instead.
  • The previously-undocumented foo{x,y} bounded-repeat syntax was replaced with foo*<x,y> to avoid a grammar ambiguity (#74).