Releases: dlang-community/Pegged
toHTML - an expandable tree view
This new patch version for Pegged (from 0.4.0 released on 2017/02/28) introduces the new toHTML
function can be used to generate an HTML file containing an expandable tree view that can be manipulated with an HTML5-compliant browser. See https://github.com/PhilippeSigaud/Pegged/wiki/Parse-Result for more details on this new fun way to explore parse results (and parse failures!).
Longest Match and Extended Pascal
This is Pegged version 0.4.0.
- This new minor release introduces a longest-match alternation operator,
|
, which will always choose the longest match during a parse. See https://github.com/PhilippeSigaud/Pegged/wiki/Extended-PEG-Syntax for more details and the interest of this operator for grammar writers. - The left-recursion engine, introduced in version v0.3.0 is now fully documented in the wiki at https://github.com/PhilippeSigaud/Pegged/wiki/Left-Recursion. Pegged can deal with left recursion, hidden left recursion and indirect left recursion. Try it!
- These improvements allow Pegged to generate a parser that fully parses Extended Pascal files, based on the official ISO 10206:1990 grammar. Have a look at it in the
pegged/examples/extended_pascal
directory.
Thanks a lot for Bastiaan Veelo for these wonderful improvements to Pegged!
DMD 2.072 compatibility
This release corrects what is now an error in DMD 2.072: implicit strings concatenation.
All unittests still pass with 2.072: all seems OK.
DMD 2.071 import compat
DMD 2.071 changed some import rules and corrected some long-standing import bugs. This release makes Pegged compatible with that and should be totally transparent to the user.
Thanks to @ReneZwanenburg for the PR!
v0.3.1: Updating package.json (#181)
This a small bug-correcting release: we forgot to list introspection.d
in the package.json
file for Pegged. This broke dub builds for v0.3.0.
Left-recursion
This new minor release (v0.3.0) brings left-recursion to Pegged, thanks to Bastiaan Veelo (@veelo).
[Note: using v0.3 as a version tag in a previous commit was a mistake, consider this the 'real' new minor release].
Pegged grammars now supports direct, indirect and hidden left-recursion:
import pegged.grammar;
mixin(grammar(Left: S <- E eoi E <- E '+n' / 'n'
));
void main() {
ParseTree result = Left("n+n+n+n");
assert(result.successful);
assert(result.matches == ["n", "+n", "+n", "+n"]);
}
This version also offers case-insensitive literals, marked like this: "abc"i (with a i after the literal).
import pegged.grammar;
mixin(grammar(CaseInsensitive: S <- "abc"i
));
void main() {
assert(CaseInsensitive("aBc").successful);
assert(CaseInsensitive("abc").successful);
assert(CaseInsensitive("AbC").successful);
}
Left-recursion
This new minor release (v0.3) brings left-recursion to Pegged, thanks to Bastiaan Veelo (@veelo).
Pegged grammars now supports direct, indirect and hidden left-recursion:
import pegged.grammar;
mixin(grammar(`
Left:
S <- E eoi
E <- E '+n' / 'n'
`));
void main() {
ParseTree result = Left("n+n+n+n");
assert(result.successful);
assert(result.matches == ["n", "+n", "+n", "+n"]);
}
This version also offers case-insensitive literals, marked like this: "abc"i
(with a i
after the literal).
import pegged.grammar;
mixin(grammar(`
CaseInsensitive:
S <- "abc"i
`));
void main() {
assert(CaseInsensitive("aBc").successful);
assert(CaseInsensitive("abc").successful);
assert(CaseInsensitive("AbC").successful);
}
v0.2.1
This is just a slight change, to make Pegged compatible with the nexw DMD 2.067 and associated Phobos (packages and modules are slightly different in 2.067).
First version
This version (0.1.0) aims to make the repo compatible with dub / code.dlang.org, and avoiding "~master" dependencies.