# Path: ayrton/parser/pyparser/pygram.py
# class PythonGrammar(parser.Grammar):
# class _Tokens(object):
# class _Symbols(object):
#     KEYWORD_TOKEN = pytoken.python_tokens["NAME"]
#     TOKENS = pytoken.python_tokens
#     OPERATOR_MAP = pytoken.python_opmap
# def _get_python_grammar():
# 
# Path: ayrton/parser/pyparser/pytoken.py
# def _add_tok(name, *values):
# 
# Path: ayrton/parser/pyparser/error.py
# class TokenError(SyntaxError):
# 
#     def __init__(self, msg, line, lineno, column, tokens, lastlineno=0):
#         SyntaxError.__init__(self, msg, lineno, column, line,
#                              lastlineno=lastlineno)
#         self.tokens = tokens
# 
# class TokenIndentationError(IndentationError):
# 
#     def __init__(self, msg, line, lineno, column, tokens):
#         SyntaxError.__init__(self, msg, lineno, column, line)
#         self.tokens = tokens
# 
# class TabError(IndentationError):
#     def __init__(self, lineno=0, offset=0, text=None, filename=None,
#                  lastlineno=0):
#         msg = "inconsistent use of tabs and spaces in indentation"
#         IndentationError.__init__(self, msg, lineno, offset, text, filename, lastlineno)
# 
# Path: ayrton/parser/pyparser/pytokenize.py

# 
# Path: ayrton/parser/astcompiler/consts.py
# CO_OPTIMIZED = 0x0001
# CO_NEWLOCALS = 0x0002
# CO_VARARGS = 0x0004
# CO_VARKEYWORDS = 0x0008
# CO_NESTED = 0x0010
# CO_GENERATOR = 0x0020
# CO_NOFREE = 0x0040
# CO_COROUTINE = 0x0080
# CO_ITERABLE_COROUTINE = 0x0100    # set by @types.coroutine
# CO_GENERATOR_ALLOWED = 0x1000
# CO_FUTURE_DIVISION = 0x2000
# CO_FUTURE_ABSOLUTE_IMPORT = 0x4000
# CO_FUTURE_WITH_STATEMENT = 0x8000
# CO_FUTURE_PRINT_FUNCTION = 0x10000
# CO_FUTURE_UNICODE_LITERALS = 0x20000
# CO_FUTURE_BARRY_AS_BDFL = 0x40000
# CO_FUTURE_GENERATOR_STOP = 0x80000
# CO_KILL_DOCSTRING = 0x100000
# CO_YIELD_INSIDE_TRY = 0x200000
# FVC_MASK      = 0x3
# FVC_NONE      = 0x0
# FVC_STR       = 0x1
# FVC_REPR      = 0x2
# FVC_ASCII     = 0x3
# FVS_MASK      = 0x4
# FVS_HAVE_SPEC = 0x4


from ayrton.parser.pyparser import automata
from ayrton.parser.pyparser.pygram import tokens
from ayrton.parser.pyparser.pytoken import python_opmap
from ayrton.parser.pyparser.error import TokenError, TokenIndentationError, TabError
from ayrton.parser.pyparser.pytokenize import tabsize, alttabsize, whiteSpaceDFA, \
    triple_quoted, endDFAs, single_quoted, pseudoDFA
from ayrton.parser.astcompiler import consts
    from pypy.objspace.std.unicodeobject import _isidentifier
                contline = contline + line
                continue

        elif parenlev == 0 and not continued:  # new statement
            if not line: break
            column = 0
            altcolumn = 0
            while pos < max:                   # measure leading whitespace
                if line[pos] == ' ':
                    column = column + 1
                    altcolumn = altcolumn + 1
                elif line[pos] == '\t':
                    column = (column/tabsize + 1)*tabsize
                    altcolumn = (altcolumn/alttabsize + 1)*alttabsize
                elif line[pos] == '\f':
                    column = 0
                else:
                    break
                pos = pos + 1
            if pos == max: break

            if line[pos] in '#\r\n':
                # skip comments or blank lines
                continue

            if column == indents[-1]:
                if altcolumn != altindents[-1]:
                    raise TabError(lnum, pos, line)
            elif column > indents[-1]:           # count indents or dedents
                if altcolumn <= altindents[-1]:

# Path: ayrton/parser/pyparser/pygram.py
# class PythonGrammar(parser.Grammar):
# class _Tokens(object):
# class _Symbols(object):
#     KEYWORD_TOKEN = pytoken.python_tokens["NAME"]
#     TOKENS = pytoken.python_tokens
#     OPERATOR_MAP = pytoken.python_opmap
# def _get_python_grammar():
# 
# Path: ayrton/parser/pyparser/pytoken.py
# def _add_tok(name, *values):
# 
# Path: ayrton/parser/pyparser/error.py
# class TokenError(SyntaxError):
# 
#     def __init__(self, msg, line, lineno, column, tokens, lastlineno=0):
#         SyntaxError.__init__(self, msg, lineno, column, line,
#                              lastlineno=lastlineno)
#         self.tokens = tokens
# 
# class TokenIndentationError(IndentationError):
# 
#     def __init__(self, msg, line, lineno, column, tokens):
#         SyntaxError.__init__(self, msg, lineno, column, line)
#         self.tokens = tokens
# 
# class TabError(IndentationError):
#     def __init__(self, lineno=0, offset=0, text=None, filename=None,
#                  lastlineno=0):
#         msg = "inconsistent use of tabs and spaces in indentation"
#         IndentationError.__init__(self, msg, lineno, offset, text, filename, lastlineno)
# 
# Path: ayrton/parser/pyparser/pytokenize.py

# 
# Path: ayrton/parser/astcompiler/consts.py
# CO_OPTIMIZED = 0x0001
# CO_NEWLOCALS = 0x0002
# CO_VARARGS = 0x0004
# CO_VARKEYWORDS = 0x0008
# CO_NESTED = 0x0010
# CO_GENERATOR = 0x0020
# CO_NOFREE = 0x0040
# CO_COROUTINE = 0x0080
# CO_ITERABLE_COROUTINE = 0x0100    # set by @types.coroutine
# CO_GENERATOR_ALLOWED = 0x1000
# CO_FUTURE_DIVISION = 0x2000
# CO_FUTURE_ABSOLUTE_IMPORT = 0x4000
# CO_FUTURE_WITH_STATEMENT = 0x8000
# CO_FUTURE_PRINT_FUNCTION = 0x10000
# CO_FUTURE_UNICODE_LITERALS = 0x20000
# CO_FUTURE_BARRY_AS_BDFL = 0x40000
# CO_FUTURE_GENERATOR_STOP = 0x80000
# CO_KILL_DOCSTRING = 0x100000
# CO_YIELD_INSIDE_TRY = 0x200000
# FVC_MASK      = 0x3
# FVC_NONE      = 0x0
# FVC_STR       = 0x1
# FVC_REPR      = 0x2
# FVC_ASCII     = 0x3
# FVS_MASK      = 0x4
# FVS_HAVE_SPEC = 0x4


# Path: ayrton/parser/pyparser/pytokenizer.py
from ayrton.parser.pyparser import automata
from ayrton.parser.pyparser.pygram import tokens
from ayrton.parser.pyparser.pytoken import python_opmap
from ayrton.parser.pyparser.error import TokenError, TokenIndentationError, TabError
from ayrton.parser.pyparser.pytokenize import tabsize, alttabsize, whiteSpaceDFA, \
    triple_quoted, endDFAs, single_quoted, pseudoDFA
from ayrton.parser.astcompiler import consts
    from pypy.objspace.std.unicodeobject import _isidentifier

                contline = contline + line
                continue

        elif parenlev == 0 and not continued:  # new statement
            if not line: break
            column = 0
            altcolumn = 0
            while pos < max:                   # measure leading whitespace
                if line[pos] == ' ':
                    column = column + 1
                    altcolumn = altcolumn + 1
                elif line[pos] == '\t':
                    column = (column/tabsize + 1)*tabsize
                    altcolumn = (altcolumn/alttabsize + 1)*alttabsize
                elif line[pos] == '\f':
                    column = 0
                else:
                    break
                pos = pos + 1
            if pos == max: break

            if line[pos] in '#\r\n':
                # skip comments or blank lines
                continue

            if column == indents[-1]:
                if altcolumn != altindents[-1]:
                    raise TabError(lnum, pos, line)
            elif column > indents[-1]:           # count indents or dedents
                if altcolumn <= altindents[-1]:

                    raise TabError(lnum, pos, line)