 
 REGEX_ILLEGAL = /// ^ ( / | /{3}\s*) (\*) ///
 
+POSSIBLY_DIVISION   = /// ^ /=?\s ///
+
 # Other regexes.
 MULTILINER          = /\n/g
 


# Regex-matching-regexes.
REGEX = /// ^
  / (?! [\s=] ) (    # disallow leading whitespace or equals sign
  ?: [^ [ / \n \\ ]  # every other thing
   | \\.             # anything (but newlines) escaped
   | \[              # character class
       (?: \\. | [^ \] \n \\ ] )*
     ]
  )+ /
///

REGEX_FLAGS  = /^\w*/

# Boolean tokens.
BOOL = ['TRUE', 'FALSE']

# Tokens which could legitimately be invoked or indexed. An opening
# parentheses or bracket following these tokens will be recorded as the start
# of a function invocation or indexing operation.
CALLABLE  = ['IDENTIFIER', ')', ']', '?', '@', 'THIS', 'SUPER']
INDEXABLE = CALLABLE.concat ['NUMBER', 'STRING', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '}', '::']

# Tokens which a regular expression will never immediately follow (except spaced
# CALLABLEs in some cases), but which a division operator can.
#
# See: http://www-archive.mozilla.org/js/language/js20-2002-04/rationale/syntax.html#regular-expressions
NOT_REGEX = INDEXABLE.concat ['++', '--']

# Tokens that, when immediately preceding a `WHEN`, indicate that the `WHEN`
# occurs at the start of a line. We disambiguate these from trailing whens to
