# Path: bigrig/parser/utils.py
# def is_identifier_start(char):
#     return char in IDENTIFIER_START_CHARS or ud.category(char) in IDENTIFIER_START_CLASSES
# 
# def is_identifier_part(char):
#     return char in IDENTIFIER_START_CHARS or ud.category(char) in IDENTIFIER_PART_CLASSES
# 
# def is_whitespace_char(char):
#     return char in WHITESPACE_CHARS or ud.category(char) == 'Zs'
# 
# def is_line_terminator(char):
#     return char in LINE_TERMINATOR_CHARS
# 
# class Locator(object):
#     """
#     Contains source location tracking information.
#     """
#     __slots__ = ('filename', 'line', 'column', 'offset')
#     def __init__(self, filename, line, column, offset):
#         self.filename = filename
#         self.line = line
#         self.column = column
#         self.offset = offset
# 
#     def __repr__(self):
#         return '<%s line %d, column %d>' % (self.filename, self.line, self.column)
# 
# class Stream(object):
#     """
#     A light wrapper on a codecs.Reader object that provides position tracking
#     and a peek method.
#     """
#     def __init__(self, stream, offset=0):
#         self.stream = stream
#         self.offset = offset
#         self.next_char = None
#         self.next()
# 
#     def peek(self):
#         return self.next_char
# 
#     def next(self):
#         char = self.next_char
#         self.next_char = self.stream.read(chars=1)
#         return char


from .token import *
from .constants import *
from .utils import (
    is_identifier_start, is_identifier_part, is_whitespace_char,
    is_line_terminator, Locator, Stream
)
        from cStringIO import StringIO
        from StringIO import StringIO
    import codecs
"""
An ECMAScript 3 lexical scanner implementation and various related utilities.
"""

class Scanner(object):
    """
    Produces lexical tokens from a given input stream.
    """
    def __init__(self, stream, filename=None, line=0, column=0, offset=0):

# Path: bigrig/parser/utils.py
# def is_identifier_start(char):
#     return char in IDENTIFIER_START_CHARS or ud.category(char) in IDENTIFIER_START_CLASSES
# 
# def is_identifier_part(char):
#     return char in IDENTIFIER_START_CHARS or ud.category(char) in IDENTIFIER_PART_CLASSES
# 
# def is_whitespace_char(char):
#     return char in WHITESPACE_CHARS or ud.category(char) == 'Zs'
# 
# def is_line_terminator(char):
#     return char in LINE_TERMINATOR_CHARS
# 
# class Locator(object):
#     """
#     Contains source location tracking information.
#     """
#     __slots__ = ('filename', 'line', 'column', 'offset')
#     def __init__(self, filename, line, column, offset):
#         self.filename = filename
#         self.line = line
#         self.column = column
#         self.offset = offset
# 
#     def __repr__(self):
#         return '<%s line %d, column %d>' % (self.filename, self.line, self.column)
# 
# class Stream(object):
#     """
#     A light wrapper on a codecs.Reader object that provides position tracking
#     and a peek method.
#     """
#     def __init__(self, stream, offset=0):
#         self.stream = stream
#         self.offset = offset
#         self.next_char = None
#         self.next()
# 
#     def peek(self):
#         return self.next_char
# 
#     def next(self):
#         char = self.next_char
#         self.next_char = self.stream.read(chars=1)
#         return char


# Path: bigrig/parser/scanner.py
from .token import *
from .constants import *
from .utils import (
    is_identifier_start, is_identifier_part, is_whitespace_char,
    is_line_terminator, Locator, Stream
)
        from cStringIO import StringIO
        from StringIO import StringIO
    import codecs

"""
An ECMAScript 3 lexical scanner implementation and various related utilities.
"""

class Scanner(object):
    """
    Produces lexical tokens from a given input stream.
    """
    def __init__(self, stream, filename=None, line=0, column=0, offset=0):

        self.stream = Stream(stream, offset)