Skip to content

Releases: TheLartians/PEGParser

Add subscript operator to Expression to access sub-expressions by name

05 Feb 15:35
99ea226
Compare
Choose a tag to compare

Now allows querying expressions by rule names. When passing a string to the subscript operator, the first subexpression parsed with the matching rule name is returned. Thanks to @jteuber for the idea and PR #60!

Example

ParserGenerator<bool> program;
program["Word"] << "[a-z]+";
program["Yell"] << "[A-Z]+";
program["Start"] << "Word | Yell" >> [](auto e){ return bool(e["Yell"]); }
REQUIRE(!program.run("hello"));
REQUIRE(program.run("HELLO"));

Update dependencies and namespace target

21 Jan 09:17
f5788b6
Compare
Choose a tag to compare
Update dependencies, fix readme example (#58)

* update dependencies, namespace targets and activate cmake format

* fix valgrind install

* merge envs

Rename grammar namespace and add bounds check

15 Jun 15:53
0978415
Compare
Choose a tag to compare
Namespace rename and string_view bounds check (#54)

* rename grammar namespace from 'presets' to 'grammar'

* return 0 character on end of string

* enable windows workflow

* apply clang-format

* bump version in CMake

v2.0: modernise and rename project (#50)

07 May 12:52
2dad517
Compare
Choose a tag to compare
* modernize and rename project

* use gcc-9

* improve compiler compatibility

* improve instalibility

* include array header

* install glue target

* remove lossy conversions

* add find_package(PEGParserGlue)

* disable shadown warning

* remove deprecated std::iterator

* remove conversion

* rename examples and unshadow member

* add example workflow

* remove arg name

* rename workflow

* try with auto

* remove default argument

* move callback type outside function

* rename peg -> presets

* move OtherExpression out of type declarations

* use template callback parameter

* unwrap call

* add missing args

* add explicit conversion

* add implicit args

* use explicit arguments

* add explicit conversion

* don't supress output

* abort windows tests

v1.10: bugfix and performance improvement (#48)

04 Sep 12:02
c41fdfb
Compare
Choose a tag to compare
* add bugfix and tests

* update version

v1.9: Update Glue (#43)

04 May 22:28
1a85480
Compare
Choose a tag to compare
* update CPM

* update extension

* v1.9

* update tests

update cmake (v1.8) (#38)

14 Apr 13:22
c2bc3cb
Compare
Choose a tag to compare
  • support for iOS < 11.0 (C++17's std::get is not supported)
  • consistent cmake option names

v1.7 (#35)

12 Apr 20:48
1fbd9d1
Compare
Choose a tag to compare
* closes #33

* added Werror

* error symbol is now the default rule

* update LHC

* correct spelling for cacheable

* update LHC

* update Glue

* update tests

* update CPM

* v1.7

* update CMake

* update Glue

* update Glue

* update readme

* update Glue

* upadate Glue

v1.6: update readme (#22)

11 Apr 09:09
9e9aa9b
Compare
Choose a tag to compare
* update readme

* Update README.md

* Update README.md

* Update CMakeLists.txt (#24)

v1.5 (#21)

10 Apr 16:48
6589ec5
Compare
Choose a tag to compare
* rename files

* add extension

* add extension test

* refactor peg grammar program

* update parser extension test

* update deps

* update travis

* update Glue

* v1.5