Allowed underscores in occam identifiers

I must admit, this was mainly done to allow munged names back in again as valid identifiers.

OEP 144 suggests replacing dot with underscore; this change just allows underscore alongside dot.  It won't break any existing code, and seems like something we want anyway, so I think it's a valid thing to do.
This commit is contained in:
Neil Brown 2009-04-02 15:42:26 +00:00
parent 9e3e71c70a
commit dbd315abd6

View File

@ -74,7 +74,7 @@ $vertSpace = [\r\n]
| "VECSPACE" | "VECSPACE"
| ".STATIC" | ".VSPTR" | ".WSSIZE" | ".STATIC" | ".VSPTR" | ".WSSIZE"
@identifier = [a-z A-Z] [a-z A-Z 0-9 \.]* @identifier = [a-z A-Z] [a-z A-Z 0-9 \._]*
@hexEscape = \# $hexDigit $hexDigit @hexEscape = \# $hexDigit $hexDigit
@escape = \* ( @hexEscape | [^\#\n] ) @escape = \* ( @hexEscape | [^\#\n] )