Skip to content

Commit edcd297

Browse files
committed
Updated README.md
1 parent ebba040 commit edcd297

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

README.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ You can also try the online version, PEG Playground at https://yhirose.github.io
1212

1313
The PEG syntax is well described on page 2 in the [document](http://www.brynosaurus.com/pub/lang/peg.pdf) by Bryan Ford. *cpp-peglib* also supports the following additional syntax for now:
1414

15-
* `'...'i` (Case-insensitive literal operator)
16-
* `[...]i` (Case-insensitive character class operator)
17-
* `[^...]` (Negated character class operator)
18-
* `[^...]i` (Case-insensitive negated character class operator)
19-
* `{2,5}` (Regex-like repetition operator)
20-
* `<` ... `>` (Token boundary operator)
21-
* `~` (Ignore operator)
22-
* `\x20` (Hex number char)
23-
* `\u10FFFF` (Unicode char)
24-
* `%whitespace` (Automatic whitespace skipping)
25-
* `%word` (Word expression)
26-
* `$name(` ... `)` (Capture scope operator)
27-
* `$name<` ... `>` (Named capture operator)
28-
* `$name` (Backreference operator)
29-
* `|` (Dictionary operator)
30-
* `` (Cut operator)
31-
* `MACRO_NAME(` ... `)` (Parameterized rule or Macro)
32-
* `{ precedence L - + L / * }` (Parsing infix expression)
33-
* `%recovery(` ... `)` (Error recovery operator)
34-
* `exp⇑label` or `exp^label` (Syntax sugar for `(exp / %recover(label))`)
35-
* `label { error_message "..." }` (Error message instruction)
36-
* `{ no_ast_opt }` (No AST node optimization instruction)
15+
* `'...'i` (Case-insensitive literal operator)
16+
* `[...]i` (Case-insensitive character class operator)
17+
* `[^...]` (Negated character class operator)
18+
* `[^...]i` (Case-insensitive negated character class operator)
19+
* `{2,5}` (Regex-like repetition operator)
20+
* `<` ... `>` (Token boundary operator)
21+
* `~` (Ignore operator)
22+
* `\x20` (Hex number char)
23+
* `\u10FFFF` (Unicode char)
24+
* `%whitespace` (Automatic whitespace skipping)
25+
* `%word` (Word expression)
26+
* `$name(` ... `)` (Capture scope operator)
27+
* `$name<` ... `>` (Named capture operator)
28+
* `$name` (Backreference operator)
29+
* `|` (Dictionary operator)
30+
* `` (Cut operator)
31+
* `MACRO_NAME(` ... `)` (Parameterized rule or Macro)
32+
* `{ precedence L - + L / * }` (Parsing infix expression)
33+
* `%recovery(` ... `)` (Error recovery operator)
34+
* `exp⇑label` or `exp^label` (Syntax sugar for `(exp / %recover(label))`)
35+
* `label { error_message "..." }` (Error message instruction)
36+
* `{ no_ast_opt }` (No AST node optimization instruction)
3737

3838
'End of Input' check will be done as default. To disable the check, please call `disable_eoi_check`.
3939

@@ -136,10 +136,10 @@ There are four semantic actions available:
136136

137137
`SemanticValues` value contains the following information:
138138

139-
- Semantic values
140-
- Matched string information
141-
- Token information if the rule is literal or uses a token boundary operator
142-
- Choice number when the rule is 'prioritized choice'
139+
* Semantic values
140+
* Matched string information
141+
* Token information if the rule is literal or uses a token boundary operator
142+
* Choice number when the rule is 'prioritized choice'
143143

144144
`any& dt` is a 'read-write' context data which can be used for whatever purposes. The initial context data is set in `peg::parser::parse` method.
145145

@@ -281,9 +281,9 @@ As you can see in the first example, we can ignore whitespaces between tokens au
281281

282282
`%whitespace` rule can be applied to the following three conditions:
283283

284-
* trailing spaces on tokens
285-
* leading spaces on text
286-
* trailing spaces on literal strings in rules
284+
* trailing spaces on tokens
285+
* leading spaces on text
286+
* trailing spaces on literal strings in rules
287287

288288
These are valid tokens:
289289

@@ -787,13 +787,13 @@ Number <- < [0-9]+ >
787787
Sample codes
788788
------------
789789
790-
* [Calculator](https://github.com/yhirose/cpp-peglib/blob/master/example/calc.cc)
791-
* [Calculator (with parser operators)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc2.cc)
792-
* [Calculator (AST version)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc3.cc)
793-
* [Calculator (parsing expressions by precedence climbing)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc4.cc)
794-
* [Calculator (AST version and parsing expressions by precedence climbing)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc5.cc)
795-
* [A tiny PL/0 JIT compiler in less than 900 LOC with LLVM and PEG parser](https://github.com/yhirose/pl0-jit-compiler)
796-
* [A Programming Language just for writing Fizz Buzz program. :)](https://github.com/yhirose/fizzbuzzlang)
790+
* [Calculator](https://github.com/yhirose/cpp-peglib/blob/master/example/calc.cc)
791+
* [Calculator (with parser operators)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc2.cc)
792+
* [Calculator (AST version)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc3.cc)
793+
* [Calculator (parsing expressions by precedence climbing)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc4.cc)
794+
* [Calculator (AST version and parsing expressions by precedence climbing)](https://github.com/yhirose/cpp-peglib/blob/master/example/calc5.cc)
795+
* [A tiny PL/0 JIT compiler in less than 900 LOC with LLVM and PEG parser](https://github.com/yhirose/pl0-jit-compiler)
796+
* [A Programming Language just for writing Fizz Buzz program. :)](https://github.com/yhirose/fizzbuzzlang)
797797
798798
License
799799
-------

0 commit comments

Comments
 (0)