diff --git a/README.md b/README.md index 732d463..cc4ca5b 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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)] diff --git a/pest-test-gen/Cargo.toml b/pest-test-gen/Cargo.toml index b43aa56..a12b355 100644 --- a/pest-test-gen/Cargo.toml +++ b/pest-test-gen/Cargo.toml @@ -2,7 +2,7 @@ name = "pest-test-gen" description = "Macro for generating tests from pest-test test cases" authors = ["John Didion "] -version = "0.1.6" +version = "0.1.7" keywords = ["parsing", "pest", "macro"] categories = ["parsing"] repository = "https://github.com/jdidion/pest-test" diff --git a/pest-test/Cargo.toml b/pest-test/Cargo.toml index 770137f..464d657 100644 --- a/pest-test/Cargo.toml +++ b/pest-test/Cargo.toml @@ -2,7 +2,7 @@ name = "pest-test" description = "Testing framework for pest parsers" authors = ["John Didion "] -version = "0.1.5" +version = "0.1.6" keywords = ["parsing", "pest"] categories = ["parsing"] repository = "https://github.com/jdidion/pest-test"