# Path: pydsl/lex.py
# def lexer_factory(alphabet, base, force_lexer = None):
#     if force_lexer is None:
#         if alphabet == ascii_encoding:
#             force_lexer = "lexer"
#         elif isinstance(alphabet, Choice) and alphabet.alphabet == base:
#             force_lexer = "brute_force"
#         else:
#             force_lexer = "general"
#         
#     if force_lexer == "lexer":
#         return ChoiceLexer(alphabet)
#     elif force_lexer == "brute_force":
#         return ChoiceBruteForceLexer(alphabet)
#     elif force_lexer == "general":
#         return GeneralLexer(alphabet, base)
#     else:
#         raise ValueError
# 
# Path: pydsl/encoding.py



from pydsl.lex import lexer_factory
from pydsl.encoding import ascii_encoding
        from pydsl.check import check
        from pydsl.tree import ParseTree
    from pydsl.grammar.BNF import BNFGrammar
            from pydsl.parser.backtracing import BacktracingErrorRecursiveDescentParser
            from pydsl.parser.LR0 import LR0Parser
            from pydsl.parser.LL import LL1RecursiveDescentParser
import logging
#!/usr/bin/python
# -*- coding: utf-8 -*-
#This file is part of pydsl.
#
#pydsl 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.
#
#pydsl 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 pydsl.  If not, see <http://www.gnu.org/licenses/>.

"""Parser module"""

__author__ = "Nestor Arocha"
__copyright__ = "Copyright 2008-2017, Nestor Arocha"
__email__ = "nesaro@gmail.com"

LOG = logging.getLogger(__name__)


class Parser(object):
    """Expands an input based on grammar rules
    At this time, all parsers are tree based"""
    def __init__(self, productionset):

# Path: pydsl/lex.py
# def lexer_factory(alphabet, base, force_lexer = None):
#     if force_lexer is None:
#         if alphabet == ascii_encoding:
#             force_lexer = "lexer"
#         elif isinstance(alphabet, Choice) and alphabet.alphabet == base:
#             force_lexer = "brute_force"
#         else:
#             force_lexer = "general"
#         
#     if force_lexer == "lexer":
#         return ChoiceLexer(alphabet)
#     elif force_lexer == "brute_force":
#         return ChoiceBruteForceLexer(alphabet)
#     elif force_lexer == "general":
#         return GeneralLexer(alphabet, base)
#     else:
#         raise ValueError
# 
# Path: pydsl/encoding.py



# Path: pydsl/parser/parser.py
from pydsl.lex import lexer_factory
from pydsl.encoding import ascii_encoding
        from pydsl.check import check
        from pydsl.tree import ParseTree
    from pydsl.grammar.BNF import BNFGrammar
            from pydsl.parser.backtracing import BacktracingErrorRecursiveDescentParser
            from pydsl.parser.LR0 import LR0Parser
            from pydsl.parser.LL import LL1RecursiveDescentParser
import logging

#!/usr/bin/python
# -*- coding: utf-8 -*-
#This file is part of pydsl.
#
#pydsl 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.
#
#pydsl 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 pydsl.  If not, see <http://www.gnu.org/licenses/>.

"""Parser module"""

__author__ = "Nestor Arocha"
__copyright__ = "Copyright 2008-2017, Nestor Arocha"
__email__ = "nesaro@gmail.com"

LOG = logging.getLogger(__name__)


class Parser(object):
    """Expands an input based on grammar rules
    At this time, all parsers are tree based"""
    def __init__(self, productionset):

        self._productionset = productionset