<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/packcc/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 15 Aug 2019 10:11:41 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/packcc/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v19
+++ v20
@@ -1,3 +1,7 @@
+&lt;big&gt;**PackCC project was moved to [GitHub](https://github.com/arithy/packcc) in August 2019.**&lt;/big&gt;
+
+-----
+
 # Overview #

 PackCC is a packrat parser generator for C. Its main features are as follows:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 15 Aug 2019 10:11:41 -0000</pubDate><guid>https://sourceforge.netce98bc0acaaf281c558c3fdd39397fe2a16a8ca4</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v18
+++ v19
@@ -197,9 +197,11 @@

 **_element_ `~` `{` _c source code_ `}`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-error action, which is invoked immediately if preceding pattern fails
+Curly braces following tilde (`~`) surround an error action. The error action is arbitrary C source code to be executed at the end of matching only if the preceding _element_ matching fails. Any braces within the error action must be properly nested. One or more error actions can be inserted in any places after elements in the pattern. The operator tilde (`~`) binds less tightly than any other operator except alternation (`/`) and sequencing. The error action is intended to make error handling and recovery code easier to write. In the error action, all predefined variables described above are available as well. The examples are shown below.
+
+    ::text
+    rule1 &amp;lt;- e1 e2 e3 ~{ error("e[12] ok; e3 has failed"); }
+    rule2 &amp;lt;- (e1 e2 e3) ~{ error("one of e[123] has failed"); }

 **`%header` `{` _c source code_ `}`**

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 17:16:39 -0000</pubDate><guid>https://sourceforge.nete3b4e5c05bdde38f902cda5f889505bbf571b502</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v17
+++ v18
@@ -160,24 +160,40 @@

 **`{` _c source code_ `}`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-action
-- **`$$`** : output variable
-- **`auxil`** : user-defined data
-- *variable* : the result of the evaluated rule
-- **`$`**_n_ : the captured text
-- **`$`**_n_**`s`** : the start position of the captured text (inclusive)
-- **`$`**_n_**`e`** : the end position of the captured text (exclusive)
-- **`$0`** : the text between the start position of the rule and the current position at the action
-- **`$0s`** : the start position of the rule
-- **`$0e`** : the current position at the action
-actions to be executed are not selected where match fails and revert
-
-    ::text
-    a b { puts("X\n"); } c / a b d   # the action is not invoked if input is a b d
-
-actions are guaranteed to be executed only once
+Curly braces surround an action. The action is arbitrary C source code to be executed at the end of matching. Any braces within the action must be properly nested. One or more actions can be inserted in any places between elements in the pattern. Actions are not executed where matching fails.
+
+    ::text
+    [0-9]+ 'foo' { puts("OK"); } 'bar' / [0-9]+ 'foo' 'baz'
+
+In this example, if the input is `012foobar`, the action `{ puts("OK"); }` is to be executed, but if the input is `012foobaz`, the action is not to be executed. All matched actions are guaranteed to be executed only once.
+
+In the action, the C source code can use the predefined variables below.
+
+- **`$$`** 
+    The output variable, to which the result of the rule is stored.
+- **`auxil`**
+    The user-defined data that is passed to the API function `pcc_create()`.
+- _variable_
+    The result of the evaluated rule, which has been stored to the variable `$$` in the action in the evaluated rule.
+- **`$`**_n_
+    The string of the captured text. The _n_ is the positive integer that corresponds to the order of capturing. The variable `$1` holds the string of the first captured text.
+- **`$`**_n_**`s`**
+    The start position in the input of the captured text, inclusive. The _n_ is the positive integer that corresponds to the order of capturing. The variable `$1s` holds the start position of the first captured text.
+- **`$`**_n_**`e`**
+    The end position in the input of the captured text, exclusive. The _n_ is the positive integer that corresponds to the order of capturing. The variable `$1e` holds the end position of the first captured text.
+- **`$0`**
+    The string of the text between the start position in the input at which the rule pattern begins to match and the current position in the input at which the element immediately before the action ends to match.
+- **`$0s`**
+    The start position in the input at which the rule pattern begins to match.
+- **`$0e`**
+    The current position in the input at which the element immediately before the action ends to match.
+
+The example is shown below.
+
+    ::text
+    term &amp;lt;- l:term _ '+' _ r:factor { $$ = l + r; }
+    factor &amp;lt;- &amp;lt; [0-9]+ &amp;gt;            { $$ = atoi($1); }
+    _ &amp;lt;- [ \t]*

 **_element_ `~` `{` _c source code_ `}`**

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 16:53:08 -0000</pubDate><guid>https://sourceforge.netc74e92abd0d734fcd8d52f2830bab7eaeab8ccc9</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v16
+++ v17
@@ -80,14 +80,12 @@

 **_sequence1_ `/` _sequence2_ `/` ... `/` _sequenceN_**

-Each _sequence_ is tried in turn until one of them matches, at which time matching for the overall pattern succeeds. If no _sequence_ matches then the match of the overall pattern fails. The operator `/` has the least priority. The example is shown below.
-
-    ::text
-    a b / c d / e
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-evaluates the alternatives in order
-(`a` `b`) -&amp;gt; (`c` `d`) -&amp;gt; `e`
+Each _sequence_ is tried in turn until one of them matches, at which time matching for the overall pattern succeeds. If no _sequence_ matches then the matching for the overall pattern fails. The operator slash (`/`) has the least priority. The example is shown below.
+
+    ::text
+    'foo' rule1 / 'bar'+ [0-9]? / rule2
+
+This pattern tries matching of the first sequence (`'foo' rule1`). If it succeeds, then the overall pattern matching succeeds and ends without evaluating the subsequent sequences. Otherwise, it tries matching of the next sequence (`'bar'+ [0-9]?`). If it succeeds, then the overall pattern matching succeeds and ends without evaluating the subsequent sequence. Finally, it tries matching of the last sequence (`rule2`). If it succeeds, then the overall pattern matching succeeds. Otherwise, the overall pattern matching fails.

 **`'`_string_`'`**

@@ -114,7 +112,7 @@

 **`.`**

-A dot matches any single character. Note that the only time this fails is at the end of input, where there is no character to match.
+A dot (`.`) matches any single character. Note that the only time this fails is at the end of input, where there is no character to match.

 **_element_ `?`**

@@ -140,28 +138,25 @@

 **`(` _pattern_ `)`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-grouping (modifying the precedence of the pattern)
+Parentheses are used for grouping (modifying the precedence of the _pattern_).

 **`&amp;lt;` _pattern_ `&amp;gt;`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-grouping (modifying the precedence of the pattern)
-and text capturing
+Angle brackets are used for grouping (modifying the precedence of the _pattern_) and text capturing. The captured text is numbered in evaluation order, and can be referred to later using `$1`, `$2`, etc.

 **`$`_n_**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-captured text expansion
-`$1`, `$2`, ...
+A dollar (`$`) followed by a positive integer represents a text previously captured. The positive integer corresponds to the order of capturing. A `$1` represents the first captured text. The examples are shown below.
+
+    ::text
+    &amp;lt; [0-9]+ &amp;gt; 'foo' $1
+
+This matches `0foo0`, `123foo123`, etc.

     ::text
     '[' &amp;lt; '='* &amp;gt; '[' !( ']' $1 ']' ) . )* ( ']' $1 ']' )

-matches `[[...]]`, `[=[...]=]`, `[==[...]==]`, ...   here-document syntax in Lua
+This matches `[[`...`]]`, `[=[`...`]=]`, `[==[`...`]==]`, etc.

 **`{` _c source code_ `}`**

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 14:50:23 -0000</pubDate><guid>https://sourceforge.net43a24994f79adeb5e300a114d52f949ad7ddcb22</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v15
+++ v16
@@ -61,7 +61,7 @@

 ## Syntax ##

-A grammar consists of a set of named rules.
+A grammar consists of a set of named rules. A rule definition can be split into multiple lines.

 **_rulename_ `&amp;lt;-` _pattern_**

@@ -78,15 +78,14 @@
     ::text
     term &amp;lt;- l:term _ '+' _ r:factor { $$ = l + r; }

-**_pattern_ `/` _pattern_**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-alternatives
+**_sequence1_ `/` _sequence2_ `/` ... `/` _sequenceN_**
+
+Each _sequence_ is tried in turn until one of them matches, at which time matching for the overall pattern succeeds. If no _sequence_ matches then the match of the overall pattern fails. The operator `/` has the least priority. The example is shown below.

     ::text
     a b / c d / e

+*&amp;lt; TO BE WRITTEN &amp;gt;*
 evaluates the alternatives in order
 (`a` `b`) -&amp;gt; (`c` `d`) -&amp;gt; `e`

@@ -143,13 +142,13 @@

 *&amp;lt; TO BE WRITTEN &amp;gt;*

-grouping (modifying the precedence of the expression)
+grouping (modifying the precedence of the pattern)

 **`&amp;lt;` _pattern_ `&amp;gt;`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

-grouping (modifying the precedence of the expression)
+grouping (modifying the precedence of the pattern)
 and text capturing

 **`$`_n_**
@@ -164,7 +163,7 @@

 matches `[[...]]`, `[=[...]=]`, `[==[...]==]`, ...   here-document syntax in Lua

-**`{` _c source codes_ `}`**
+**`{` _c source code_ `}`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

@@ -185,47 +184,43 @@

 actions are guaranteed to be executed only once

-**_element_ `~` `{` _c source codes_ `}`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-error action, which is invoked immediately if preceding expression fails
-
-**`%header` `{` _c source codes_ `}`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-copied verbatim to the header file
-before generated parser API function declarations
-
-**`%source` `{` _c source codes_ `}`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-copied verbatim to the source file
-before generated parser implementation codes
-
-**`%common` `{` _c source codes_ `}`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-copied verbatim to the header file and the source file
+**_element_ `~` `{` _c source code_ `}`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
+error action, which is invoked immediately if preceding pattern fails
+
+**`%header` `{` _c source code_ `}`**
+
+The specified C source code is copied verbatim to the C header file before the generated parser API function declarations.
+
+**`%source` `{` _c source code_ `}`**
+
+The specified C source code is copied verbatim to the C source file before the generated parser implementation code.
+
+**`%common` `{` _c source code_ `}`**
+
+The specified C source code is copied verbatim to both of the C header file and the C source file before the generated parser API function declarations and the implementation code respectively.

 **`%value` `"`_output data type_`"`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
+The type of output data, which is retrieved from the parser API function `pcc_parse()`, is changed to the specified one from the default `int`.

 **`%auxil` `"`_user-defined data type_`"`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
+The type of user-defined data, which is passed to the parser API function `pcc_create()`, is changed to the specified one from the default `void *`.

 **`%prefix` `"`_prefix_`"`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
+The prefix of the parser API functions is changed to the specified one from the default `pcc`.
+
+**`#`_comment_**
+
+A comment can be inserted between `#` and the end of the line.

 **`%%`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
+A double percent `%%` terminates the section for rule definitions of the grammar. All text following `%%` is copied verbatim to the C source file after the generated parser implementation code.

 &lt;small&gt;(The specification is determined by referring to [peg/leg](http://piumarta.com/software/peg/) developed by Ian Piumarta.)&lt;/small&gt;

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 06:04:57 -0000</pubDate><guid>https://sourceforge.net76cb43eb365333dd6e0d82c230c70b28112d26ee</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v14
+++ v15
@@ -63,22 +63,22 @@

 A grammar consists of a set of named rules.

-** _rulename_ `&amp;lt;-` _pattern_ **
+**_rulename_ `&amp;lt;-` _pattern_**

 The _rulename_ is the name of the rule to define. The _pattern_ is a text pattern that contains one or more of the following elements.

-** _rulename_ **
+**_rulename_**

 The element stands for the entire pattern in the rule with the name given by _rulename_.

-** _variable_`:`_rulename_ **
+**_variable_`:`_rulename_**

 The element stands for the entire pattern in the rule with the name given by _rulename_. The _variable_ is an identifier associated with the semantic value returned from the rule by assigning to `$$` in its action. The identifier can be referred to in subsequent actions as a variable. The example is shown below.

     ::text
     term &amp;lt;- l:term _ '+' _ r:factor { $$ = l + r; }

-** *expression* `/` *expression* **
+**_pattern_ `/` _pattern_**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

@@ -90,23 +90,23 @@
 evaluates the alternatives in order
 (`a` `b`) -&amp;gt; (`c` `d`) -&amp;gt; `e`

-**`'`*string*`'`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
+**`'`_string_`'`**
+
+A character or string enclosed in single quotes is matched literally. The ANSI C escape sequences are recognized within the characters. The example is shown below.

     ::text
     'foo bar'

-**`"`*string*`"`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
+**`"`_string_`"`**
+
+A character or string enclosed in double quotes is matched literally. The ANSI C escape sequences are recognized within the characters. The example is shown below.

     ::text
     "foo bar"

-**`[`*character class*`]`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
+**`[`_character class_`]`**
+
+A set of characters enclosed in square brackets matches any single character from the set. The ANSI C escape sequences are recognized within the characters. If the set begins with an up-arrow (`^`), the set is negated (the element matches any character not in the set). Any pair of characters separated with a dash (`-`) represents the range of characters from the first to the second, inclusive. The examples are shown below.

     ::text
     [abc]
@@ -115,35 +115,37 @@

 **`.`**

-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-any one character
-
-** *element* `?`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-repetition: 0 or 1
-
-** *element* `*`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-repetition: 0 or more than 0
-
-** *element* `+`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-repetition: 1 or more than 1
-
-**`(` *expression* `)`**
+A dot matches any single character. Note that the only time this fails is at the end of input, where there is no character to match.
+
+**_element_ `?`**
+
+The _element_ is optional. If present on the input, it is consumed and the match succeeds. If not present on the input, no text is consumed and the match succeeds anyway.
+
+**_element_ `*`**
+
+The _element_ is optional and repeatable. If present on the input, one or more occurrences of the _element_ are consumed and the match succeeds. If no occurrence of the _element_ is present on the input, the match succeeds anyway.
+
+**_element_ `+`**
+
+The _element_ is repeatable. If present on the input, one or more occurrences of the _element_ are consumed and the match succeeds. If no occurrence of the _element_ is present on the input, the match fails.
+
+**`&amp;amp;` _element_**
+
+The predicate succeeds only if the _element_ can be matched. The input text scanned while matching _element_ is not consumed from the input and remains available for subsequent matching.
+
+**`!` _element_**
+
+The predicate succeeds only if the _element_ cannot be matched. The input text scanned while matching _element_ is not consumed from the input and remains available for subsequent matching. A popular idiom is the following, which matches the end of input, after the last character of the input has already been consumed.
+
+    !.
+
+**`(` _pattern_ `)`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

 grouping (modifying the precedence of the expression)

-**`&amp;lt;` *expression* `&amp;gt;`**
+**`&amp;lt;` _pattern_ `&amp;gt;`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

@@ -162,7 +164,7 @@

 matches `[[...]]`, `[=[...]=]`, `[==[...]==]`, ...   here-document syntax in Lua

-**`{` *c source codes* `}`**
+**`{` _c source codes_ `}`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

@@ -183,41 +185,41 @@

 actions are guaranteed to be executed only once

-** *element* `~` `{` *c source codes* `}`**
+**_element_ `~` `{` _c source codes_ `}`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

 error action, which is invoked immediately if preceding expression fails

-**`%header` `{` *c source codes* `}`**
+**`%header` `{` _c source codes_ `}`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

 copied verbatim to the header file
 before generated parser API function declarations

-**`%source` `{` *c source codes* `}`**
+**`%source` `{` _c source codes_ `}`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

 copied verbatim to the source file
 before generated parser implementation codes

-**`%common` `{` *c source codes* `}`**
+**`%common` `{` _c source codes_ `}`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

 copied verbatim to the header file and the source file

-**`%value` `"`*output data type*`"`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-**`%auxil` `"`*user-defined data type*`"`**
-
-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-**`%prefix` `"`*prefix*`"`**
+**`%value` `"`_output data type_`"`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
+**`%auxil` `"`_user-defined data type_`"`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
+**`%prefix` `"`_prefix_`"`**

 *&amp;lt; TO BE WRITTEN &amp;gt;*

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 03:50:13 -0000</pubDate><guid>https://sourceforge.net5522c2ef60c11156fd403fa7e706086eea4eca84</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v13
+++ v14
@@ -61,16 +61,26 @@

 ## Syntax ##

-*&amp;lt; TO BE WRITTEN &amp;gt;*
-
-** *rulename* `&amp;lt;-` *expression* **
-
-** *variable*`:`*rulename* **
+A grammar consists of a set of named rules.
+
+** _rulename_ `&amp;lt;-` _pattern_ **
+
+The _rulename_ is the name of the rule to define. The _pattern_ is a text pattern that contains one or more of the following elements.
+
+** _rulename_ **
+
+The element stands for the entire pattern in the rule with the name given by _rulename_.
+
+** _variable_`:`_rulename_ **
+
+The element stands for the entire pattern in the rule with the name given by _rulename_. The _variable_ is an identifier associated with the semantic value returned from the rule by assigning to `$$` in its action. The identifier can be referred to in subsequent actions as a variable. The example is shown below.

     ::text
     term &amp;lt;- l:term _ '+' _ r:factor { $$ = l + r; }

 ** *expression* `/` *expression* **
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*

 alternatives

@@ -82,15 +92,21 @@

 **`'`*string*`'`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
     ::text
     'foo bar'

 **`"`*string*`"`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
     ::text
     "foo bar"

 **`[`*character class*`]`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*

     ::text
     [abc]
@@ -99,31 +115,45 @@

 **`.`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 any one character

 ** *element* `?`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 repetition: 0 or 1

 ** *element* `*`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 repetition: 0 or more than 0

 ** *element* `+`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 repetition: 1 or more than 1

 **`(` *expression* `)`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 grouping (modifying the precedence of the expression)

 **`&amp;lt;` *expression* `&amp;gt;`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*

 grouping (modifying the precedence of the expression)
 and text capturing

 **`$`_n_**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 captured text expansion
 `$1`, `$2`, ...

@@ -133,6 +163,8 @@
 matches `[[...]]`, `[=[...]=]`, `[==[...]==]`, ...   here-document syntax in Lua

 **`{` *c source codes* `}`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*

 action
 - **`$$`** : output variable
@@ -153,29 +185,45 @@

 ** *element* `~` `{` *c source codes* `}`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 error action, which is invoked immediately if preceding expression fails

 **`%header` `{` *c source codes* `}`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*

 copied verbatim to the header file
 before generated parser API function declarations

 **`%source` `{` *c source codes* `}`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 copied verbatim to the source file
 before generated parser implementation codes

 **`%common` `{` *c source codes* `}`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 copied verbatim to the header file and the source file

 **`%value` `"`*output data type*`"`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 **`%auxil` `"`*user-defined data type*`"`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 **`%prefix` `"`*prefix*`"`**

+*&amp;lt; TO BE WRITTEN &amp;gt;*
+
 **`%%`**
+
+*&amp;lt; TO BE WRITTEN &amp;gt;*

 &lt;small&gt;(The specification is determined by referring to [peg/leg](http://piumarta.com/software/peg/) developed by Ian Piumarta.)&lt;/small&gt;

@@ -193,7 +241,7 @@

 **`PCC_GETCHAR(`**_auxil_**`)`**

-The function macro to get a character from the input. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. This macro must return a character code as an `int` type, or `-1` if the input ends.
+The function macro to get a character from the input. The user-defined data passed to the API function `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. This macro must return a character code as an `int` type, or `-1` if the input ends.

 The default is defined as below.

@@ -202,7 +250,7 @@

 **`PCC_ERROR(`**_auxil_**`)`**

-The function macro to handle a syntax error. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. This macro need not return a value. It may abort the process (by using `exit()` for example) when a fatal error occurs, and can also return normally to deal with warnings.
+The function macro to handle a syntax error. The user-defined data passed to the API function `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. This macro need not return a value. It may abort the process (by using `exit()` for example) when a fatal error occurs, and can also return normally to deal with warnings.

 The default is defined as below.

@@ -215,7 +263,7 @@

 **`PCC_MALLOC(`**_auxil_**`,`**_size_**`)`**

-The function macro to allocate a memory block. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _size_ is the number of bytes to allocate. This macro must return a pointer to the allocated memory block, or `NULL` if no sufficient memory is available.
+The function macro to allocate a memory block. The user-defined data passed to the API function `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _size_ is the number of bytes to allocate. This macro must return a pointer to the allocated memory block, or `NULL` if no sufficient memory is available.

 The default is defined as below.

@@ -232,7 +280,7 @@

 **`PCC_REALLOC(`**_auxil_**`,`**_ptr_**`,`**_size_**`)`**

-The function macro to reallocate the existing memory block. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _ptr_ is the pointer to the previously allocated memory block. The argument _size_ is the new number of bytes to reallocate. This macro must return a pointer to the reallocated memory block, or `NULL` if no sufficient memory is available. The contents of the memory block should be left unchanged in any case even if the reallocation fails.
+The function macro to reallocate the existing memory block. The user-defined data passed to the API function `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _ptr_ is the pointer to the previously allocated memory block. The argument _size_ is the new number of bytes to reallocate. This macro must return a pointer to the reallocated memory block, or `NULL` if no sufficient memory is available. The contents of the memory block should be left unchanged in any case even if the reallocation fails.

 The default is defined as below.

@@ -249,7 +297,7 @@

 **`PCC_FREE(`**_auxil_**`,`**_ptr_**`)`**

-The function macro to free the existing memory block. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _ptr_ is the pointer to the previously allocated memory block. This macro need not return a value.
+The function macro to free the existing memory block. The user-defined data passed to the API function `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _ptr_ is the pointer to the previously allocated memory block. This macro need not return a value.

 The default is defined as below.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 03:05:48 -0000</pubDate><guid>https://sourceforge.net5a6166688799fd71c86f371f15bfc3e46a91c59f</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v12
+++ v13
@@ -181,7 +181,7 @@

 ## Macro ##

-Some macros are prepared to customize the parser. The macro definition should be in `%source` section in the PEG source.
+Some macros are prepared to customize the parser. The macro definition should be in &lt;u&gt;`%source` section&lt;/u&gt; in the PEG source.

     ::text
     %source {
@@ -191,16 +191,20 @@

 The following macros are available.

-**`PCC_GETCHAR(`**auxil**`)`**
-
-default:
+**`PCC_GETCHAR(`**_auxil_**`)`**
+
+The function macro to get a character from the input. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. This macro must return a character code as an `int` type, or `-1` if the input ends.
+
+The default is defined as below.

     ::C
     #define PCC_GETCHAR(auxil) getchar()

-**`PCC_ERROR(`**auxil**`)`**
-
-default:
+**`PCC_ERROR(`**_auxil_**`)`**
+
+The function macro to handle a syntax error. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. This macro need not return a value. It may abort the process (by using `exit()` for example) when a fatal error occurs, and can also return normally to deal with warnings.
+
+The default is defined as below.

     ::C
     #define PCC_ERROR(auxil) pcc_error()
@@ -209,9 +213,11 @@
         exit(1);
     }

-**`PCC_MALLOC(`**auxil**`,`**size**`)`**
-
-default:
+**`PCC_MALLOC(`**_auxil_**`,`**_size_**`)`**
+
+The function macro to allocate a memory block. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _size_ is the number of bytes to allocate. This macro must return a pointer to the allocated memory block, or `NULL` if no sufficient memory is available.
+
+The default is defined as below.

     ::C
     #define PCC_MALLOC(auxil, size) pcc_malloc_e(size)
@@ -224,9 +230,11 @@
         return p;
     }

-**`PCC_REALLOC(`**auxil**`,`**ptr**`,`**size**`)`**
-
-default:
+**`PCC_REALLOC(`**_auxil_**`,`**_ptr_**`,`**_size_**`)`**
+
+The function macro to reallocate the existing memory block. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _ptr_ is the pointer to the previously allocated memory block. The argument _size_ is the new number of bytes to reallocate. This macro must return a pointer to the reallocated memory block, or `NULL` if no sufficient memory is available. The contents of the memory block should be left unchanged in any case even if the reallocation fails.
+
+The default is defined as below.

     ::C
     #define PCC_REALLOC(auxil, ptr, size) pcc_realloc_e(ptr, size)
@@ -239,9 +247,11 @@
         return p;
     }

-**`PCC_FREE(`**auxil**`,`**ptr**`)`**
-
-default:
+**`PCC_FREE(`**_auxil_**`,`**_ptr_**`)`**
+
+The function macro to free the existing memory block. The user-defined data passed to the API `pcc_create()` can be retrieved from the argument _auxil_. It can be ignored if no user-defined data. The argument _ptr_ is the pointer to the previously allocated memory block. This macro need not return a value.
+
+The default is defined as below.

     ::C
     #define PCC_FREE(auxil, ptr) free(ptr)
@@ -252,7 +262,7 @@

 **`PCC_ARRAYSIZE`**

-The initial size (the number of elements) of the arrays other than the text buffer. The arrays are expanded as needed. The default is `2`.
+The initial size (the number of elements) of the internal arrays other than the text buffer. The arrays are expanded as needed. The default is `2`.

 ## API ##

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 02:23:09 -0000</pubDate><guid>https://sourceforge.net07752932e28522264c0d778ae768c621419dae0d</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v11
+++ v12
@@ -21,6 +21,8 @@
 - Under MIT license. (not under a certain contagious license!)

 The generated code is beautified and as ease-of-understanding as possible. Actually, it uses lots of *goto* statements, but the control flows are much more traceable than *goto* spaghetti storms generated by Yacc or other parser generators. This feature is irrelevant to common users, but helpful for PackCC developers to debug it.
+
+PackCC itself is under MIT license, but you can distribute your generated code under any license you like.

 # Installation #

@@ -296,7 +298,7 @@

 # Example #

-A desktop calculator.
+A desktop calculator. Note that there are **left-recursive** grammar rules.

     ::text
     %prefix "calc"
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Thu, 21 Aug 2014 00:28:00 -0000</pubDate><guid>https://sourceforge.net3582eca03d631fe1f36b01d863a6ed480c1d327f</guid></item><item><title>Home modified by Arihiro Yoshida</title><link>https://sourceforge.net/p/packcc/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -120,7 +120,7 @@
 grouping (modifying the precedence of the expression)
 and text capturing

-**`$`*n* **
+**`$`_n_**

 captured text expansion
 `$1`, `$2`, ...
@@ -136,7 +136,12 @@
 - **`$$`** : output variable
 - **`auxil`** : user-defined data
 - *variable* : the result of the evaluated rule
-- **`$`***n* : captured text 
+- **`$`**_n_ : the captured text
+- **`$`**_n_**`s`** : the start position of the captured text (inclusive)
+- **`$`**_n_**`e`** : the end position of the captured text (exclusive)
+- **`$0`** : the text between the start position of the rule and the current position at the action
+- **`$0s`** : the start position of the rule
+- **`$0e`** : the current position at the action
 actions to be executed are not selected where match fails and revert

     ::text
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arihiro Yoshida</dc:creator><pubDate>Mon, 16 Jun 2014 01:14:58 -0000</pubDate><guid>https://sourceforge.neta9535be21a429e25194fce1a00050f8ec1c95c80</guid></item></channel></rss>