# Path: flap/latex/commons.py
# class Position:
# 
#     UNKNOWN = "Unknown source file"
#     REPRESENTATION = "{source} @({line}, {column})"
# 
#     def __init__(self, line, column, source=None):
#         self._source = source or self.UNKNOWN
#         self._line = line
#         self._column = column
# 
#     @property
#     def source(self):
#         return self._source
# 
#     @property
#     def line(self):
#         return self._line
# 
#     @property
#     def column(self):
#         return self._column
# 
#     def next_line(self):
#         return Position(self._line + 1, 0, self._source)
# 
#     def next_character(self):
#         return Position(self._line, self._column + 1, self._source)
# 
#     def __eq__(self, other):
#         if not isinstance(other, Position):
#             return False
#         return self._line == other._line and \
#             self._column == other._column
# 
#     def __repr__(self):
#         return self.REPRESENTATION.format(
#             source=self._source, line=self._line, column=self._column)
# 
# Path: flap/latex/tokens.py
# class Token:
# class TokenFactory:
#     DISPLAY = "{category}({text}){location}"
#     def __init__(self, text, category, location):
#     def send_to(self, parser):
#     def location(self):
#     def as_text(self):
#     def satisfies(self, predicate):
#     def is_a(self, category):
#     def is_ignored(self):
#     def is_a_comment(self):
#     def is_a_new_line(self):
#     def is_a_command(self):
#     def has_text(self, text):
#     def ends_with(self, text):
#     def ends_the_text(self):
#     def is_a_character(self):
#     def is_a_parameter(self):
#     def begins_a_group(self):
#     def ends_a_group(self):
#     def is_a_whitespace(self):
#     def __eq__(self, other_token):
#     def __repr__(self):
#     def __str__(self):
#     def __init__(self, symbol_table):
#     def character(location, text):
#     def command(location, text):
#     def white_space(location, text):
#     def comment(location, text):
#     def new_line(self, location, text=None):
#     def begin_group(self, location, text=None):
#     def end_group(self, location, text=None):
#     def parameter(location, key):
#     def math(self, location):
#     def superscript(self, location, text=None):
#     def subscript(self, location, text=None):
#     def non_breaking_space(self, location, text=None):
#     def others(self, location, text=None):


from unittest import TestCase, main
from flap.latex.commons import Position
from flap.latex.tokens import SymbolTable, Token, TokenFactory
#!/usr/bin/env python

#
# Copyright (C) 2015-2016 The FLaP authors
# This file is part of FLaP.
#
# Flap is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Flap is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Flap.  If not, see <http://www.gnu.org/licenses/>.
#




class TokenTests(TestCase):

    def setUp(self):
        self._tokens = TokenFactory(SymbolTable.default())

# Path: flap/latex/commons.py
# class Position:
# 
#     UNKNOWN = "Unknown source file"
#     REPRESENTATION = "{source} @({line}, {column})"
# 
#     def __init__(self, line, column, source=None):
#         self._source = source or self.UNKNOWN
#         self._line = line
#         self._column = column
# 
#     @property
#     def source(self):
#         return self._source
# 
#     @property
#     def line(self):
#         return self._line
# 
#     @property
#     def column(self):
#         return self._column
# 
#     def next_line(self):
#         return Position(self._line + 1, 0, self._source)
# 
#     def next_character(self):
#         return Position(self._line, self._column + 1, self._source)
# 
#     def __eq__(self, other):
#         if not isinstance(other, Position):
#             return False
#         return self._line == other._line and \
#             self._column == other._column
# 
#     def __repr__(self):
#         return self.REPRESENTATION.format(
#             source=self._source, line=self._line, column=self._column)
# 
# Path: flap/latex/tokens.py
# class Token:
# class TokenFactory:
#     DISPLAY = "{category}({text}){location}"
#     def __init__(self, text, category, location):
#     def send_to(self, parser):
#     def location(self):
#     def as_text(self):
#     def satisfies(self, predicate):
#     def is_a(self, category):
#     def is_ignored(self):
#     def is_a_comment(self):
#     def is_a_new_line(self):
#     def is_a_command(self):
#     def has_text(self, text):
#     def ends_with(self, text):
#     def ends_the_text(self):
#     def is_a_character(self):
#     def is_a_parameter(self):
#     def begins_a_group(self):
#     def ends_a_group(self):
#     def is_a_whitespace(self):
#     def __eq__(self, other_token):
#     def __repr__(self):
#     def __str__(self):
#     def __init__(self, symbol_table):
#     def character(location, text):
#     def command(location, text):
#     def white_space(location, text):
#     def comment(location, text):
#     def new_line(self, location, text=None):
#     def begin_group(self, location, text=None):
#     def end_group(self, location, text=None):
#     def parameter(location, key):
#     def math(self, location):
#     def superscript(self, location, text=None):
#     def subscript(self, location, text=None):
#     def non_breaking_space(self, location, text=None):
#     def others(self, location, text=None):


# Path: tests/unit/latex/test_tokens.py
from unittest import TestCase, main
from flap.latex.commons import Position
from flap.latex.tokens import SymbolTable, Token, TokenFactory

#!/usr/bin/env python

#
# Copyright (C) 2015-2016 The FLaP authors
# This file is part of FLaP.
#
# Flap is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Flap is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Flap.  If not, see <http://www.gnu.org/licenses/>.
#




class TokenTests(TestCase):

    def setUp(self):
        self._tokens = TokenFactory(SymbolTable.default())

        self._token = self._tokens.character(Position(1, 1), "a")