/ . / chimera / oslLexer.py
Functions
|
|
|
nextToken
|
nextToken (
s,
start,
end,
mode,
)
nextToken
Skip over whitespace and return a token, which is a dictionary
with at least three attributes type , start and end . start
and end are the indices for the start and end of the token.
Depending on the value of type , there may be other attributes:
type == key
key is the type of key
type == abbreviation
string is the actual abbreviation string
type == qualifier
none
type == identifier
'string is the actual identifier string
type == operator
operator is the operator type
type == end of input
none
Exceptions
|
|
ValueError, ( 'unknown osl lexer mode ', mode )
SyntaxError, ('illegal symbol in identifier', ( '', 1, n, s ) )
|
|
|
lexString
|
lexString (
s,
start,
end,
type,
)
lexString
Grab a quoted string from the input
Exceptions
|
|
SyntaxError, ('unterminated string', ( '', 1, start, s ) )
|
|
|
|