diff --git a/README.md b/README.md index 5d28cc0..9074298 100644 --- a/README.md +++ b/README.md @@ -647,6 +647,25 @@ custom_message.txt:1:8: code format error... NOTE: If there are more than one elements with error message instruction in a prioritized choice, this feature may not work as you expect. +Change the Start Definition Rule +-------------------------------- + +We can change the start definition rule as below. + +```cpp +peg::parser parser( + R"( + Start <- A + A <- B (',' B)* + B <- '[one]' / '[two]' + %whitespace <- [ \t\n]* + )", + "A" // Start Rule is "A" +)"; + +parser.parse(" [one] , [two] "); // OK +``` + peglint - PEG syntax lint utility --------------------------------- diff --git a/docs/index.html b/docs/index.html index 3ce55ee..edd068c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -20,6 +20,7 @@
  • Source Code