archives

« Bugzilla Issues Index

#510 — 5.3: missing "else..."


In 5.3 "Static Semantic Rules",
in the definition of the 'Contains' rule,
steps 1.b and 1.c say:
1.b If /sym/ is a non-terminal, let /contained/ be the result of Contains
for /sym/ with argument /symbol/.
1.c If /contained/ is true, return true.

The problem is that if, at step 1.b, /sym/ isn't a non-terminal, then /contained/ doesn't get bound, so 1.c is handling an unbound meta-variable, which is an unnecessary complication.

To fix, you could just insert
"Else let /contained/ be false."
between 1.b and 1.c.

OR, you could replace the existing 1.b and 1.c with:
1.b If /sym/ is a non-terminal then
i. Let /contained/ be the result of Contains
for /sym/ with argument /symbol/
ii. If /contained/ is true, return true.


corrected in editor's draft


fixed in rev10, Sept. 27 2012 draft