campy.io.tokenscanner module

class campy.io.tokenscanner.TokenScanner(input_stream)[source]

Bases: object

add_operator(op)[source]
add_word_characters(characters)[source]
get_char()[source]
get_position()[source]
get_string_value(token)[source]
get_token_type(token)[source]
has_more_tokens()[source]
ignore_comments(python_style=True, c_style=False)[source]
ignore_whitespace()[source]
is_word_character(ch)[source]
next_token()[source]
save_token(token)[source]
scan_numbers()[source]
scan_strings()[source]
set_input(input_stream)[source]
unget_char(ch)[source]
verify_token(expected)[source]
class campy.io.tokenscanner.TokenType[source]

Bases: enum.IntEnum

The enumerated values of the <code>get_token_type</code> method.

NUMBER = 2
OPERATOR = 4
SEPARATOR = 0
STRING = 3
WORD = 1