An example of the third basic rule of semicolon insertion

heathmatlock heathmatlock at gmail.com
Sat Jan 19 23:07:18 PST 2013


Substitute "chance" for "check" in the previous email.

On Sun, Jan 20, 2013 at 1:05 AM, heathmatlock <heathmatlock at gmail.com> wrote:
> I was looking through the section on ASI again, and I'm unsure which
> is a valid example of the third basic rule which states:
>
> "When, as the program is parsed from left to right, a token is
> encountered that is allowed by some production of the grammar, but the
> production is a restricted production and the token would be the first
> token for a terminal or nonterminal immediately following the
> annotation '[no LineTerminator here]' within the restricted production
> (and therefore such a token is called a restricted token), and the
> restricted token is separated from the previous token by at least one
> LineTerminator, then a semicolon is automatically inserted before the
> restricted token."
>
> I looked at the examples section, and the only statement that might be
> valid for this rule is the return\n a + b example, but that seems more
> like a chance against a line terminator which is what the first rule
> does.
>
> Would anyone care to offer an example or explain how the example
> mentioned above should be handled by the third rule?
>
> --
> Heath Matlock
> +1 256 274 4225



-- 
Heath Matlock
+1 256 274 4225


More information about the es-discuss mailing list