Skip to content

Commit

Permalink
bump versions, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jdidion committed Oct 6, 2023
1 parent 904a56a commit c1cf263
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ A test case is a text file with three sections:

* The test name must be on the first line of the file. It may contain any characters except newline.
* The source code block is delimited by any sequence of three or more non-whitespace characters. The same sequence of characters must preceed and follow the code block, and that sequence of characters may not appear anywhere within the code block.
* The code block must be both preceeded and followed by a line separator. The outer-most line separators are trimmed off. This means that if your parser is sensitive to leading/trailing whitespace, you must make sure to put the correct number of empty lines before/after the code block.
* The expected output syntax tree written as an [S-expression](https://en.wikipedia.org/wiki/S-expression). Optionally, a terminal node may be followed by its expected string value.
* The code block must be both preceeded and followed by a line separator. The outer-most line separators are trimmed off; any remaining line separators are left in tact. This means that if your parser is sensitive to leading/trailing whitespace, you must make sure to put the correct number of empty lines before/after the code block.
* The expected output syntax tree written as an [S-expression](https://en.wikipedia.org/wiki/S-expression). Optionally, a terminal node may be followed by its expected string value. Expected string values may contain escape characters - they are unescaped prior to comparison to the actual values.

Here is an example test. Note that the code block delimiter is exactly 7 '=' characters. In this case, the parser ignores implicit whitespace, so the numbers of blank lines before/after the code are arbitrary.

Expand Down Expand Up @@ -43,7 +43,7 @@ fn x() int {

Nodes in the expected output S-expression may be annotated with attributes of the form `#[name(args)]`. The currently recognized attributes are:

* `skip`: For some grammars, there are multiple levels of nesting that are only necessary to work around the limitations of PEG parsers, e.g. mathematical expressions with left-recursion. To simplify test cases involving such grammars, the `skip` attribute can be used to ignore a specified number of levels of nesting in the actual parse tree.
* `skip`: For some grammars, there are multiple levels of nesting that are only necessary to work around the limitations of PEG parsers, e.g., mathematical expressions with left-recursion. To simplify test cases involving such grammars, the `skip` attribute can be used to ignore a specified number of levels of nesting in the actual parse tree.
```
(expression
#[skip(depth = 3)]
Expand Down
2 changes: 1 addition & 1 deletion pest-test-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pest-test-gen"
description = "Macro for generating tests from pest-test test cases"
authors = ["John Didion <[email protected]>"]
version = "0.1.6"
version = "0.1.7"
keywords = ["parsing", "pest", "macro"]
categories = ["parsing"]
repository = "https://github.com/jdidion/pest-test"
Expand Down
2 changes: 1 addition & 1 deletion pest-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pest-test"
description = "Testing framework for pest parsers"
authors = ["John Didion <[email protected]>"]
version = "0.1.5"
version = "0.1.6"
keywords = ["parsing", "pest"]
categories = ["parsing"]
repository = "https://github.com/jdidion/pest-test"
Expand Down

0 comments on commit c1cf263

Please sign in to comment.