def test(TokenIDFile, TokenPrefix):
    print "##-----------------------------------------------------------------"
    blackboard.setup.init(setup.SETUP_INFO)
    blackboard.token_id_db.clear()
    command_line.do(["--foreign-token-id-file", "data/%s" % TokenIDFile, 
                     "--token-id-prefix", TokenPrefix,
                     "--foreign-token-id-file-show"])
def test(TokenIDFile, TokenPrefix):
    print "##-----------------------------------------------------------------"
    blackboard.setup.init(setup.SETUP_INFO)
    blackboard.token_id_db.clear()
    command_line.do([
        "--foreign-token-id-file",
        "data/%s" % TokenIDFile, "--token-id-prefix", TokenPrefix,
        "--foreign-token-id-file-show"
    ])
Beispiel #3
0
def code(Language):
    global output_dir
    global tail_str
    command_line.do([
        "-i", "nothing.qx", "-o", "TestAnalyzer", "--odir", output_dir,
        "--language", Language, "--debug-QUEX_TYPE_LEXATOM_EXT",
        "--config-by-macros"
    ])
    mode_prep_prep_db = quex_file_parser.do(Setup.input_mode_files)
    mode_db = mode.finalize_modes(mode_prep_prep_db)

    core._generate(mode_db)

    return mode_db
Beispiel #4
0
    import quex.input.command_line.core as command_line
    import quex.input.command_line.query as query
    import quex.core as core

except BaseException as instance:
    exception_checker.handle(instance)

try:
    pass
    # import psyco
    # psyco.full()
except:
    pass

if __name__ == "__main__":
    try:
        quex.DEFINITIONS.check()

        # (*) Test Exceptions __________________________________________________
        if exception_checker.do(sys.argv):
            # Done: Tests about exceptions have been performed
            pass

        # (*) The Job __________________________________________________________
        elif command_line.do(sys.argv):
            # To do: Interpret input files and generate code or drawings.
            core.do()

    except BaseException as instance:
        exception_checker.handle(instance)
def do(Argv):
    blackboard.setup.init(SETUP_INFO)
    assert False == command_line.do(Argv)
def do(simulated_argv):
    blackboard.setup.init(setup.SETUP_INFO)
    assert not command_line.do(simulated_argv)
import os
import sys

sys.path.insert(0, os.environ["QUEX_PATH"])

import quex.output.cpp.configuration   as configuration
from   quex.blackboard                 import setup as Setup
import quex.input.command_line.core    as command_line
from   quex.engine.misc.file_in        import open_file_or_die
import quex.input.files.core           as quex_file_parser


command_line.do(["-i", "nothing", "-o", "TestAnalyzer", "--token-policy", "single", "--no-include-stack"])

# Parse default token file
fh = open_file_or_die(os.environ["QUEX_PATH"] 
                      + Setup.language_db["$code_base"] 
                      + Setup.language_db["$token-default-file"])
quex_file_parser.parse_section(fh)
fh.close()

BeginOfLineSupportF = True
IndentationSupportF = False     

txt = configuration.do({})

open("TestAnalyzer-configuration", "w").write(txt)
Beispiel #8
0
import os
import sys

sys.path.insert(0, os.environ["QUEX_PATH"])

import quex.output.cpp.configuration as configuration
from quex.blackboard import setup as Setup
import quex.input.command_line.core as command_line
from quex.engine.misc.file_in import open_file_or_die
import quex.input.files.core as quex_file_parser

command_line.do([
    "-i", "nothing", "-o", "TestAnalyzer", "--token-policy", "single",
    "--no-include-stack"
])

# Parse default token file
fh = open_file_or_die(os.environ["QUEX_PATH"] +
                      Setup.language_db["$code_base"] +
                      Setup.language_db["$token-default-file"])
quex_file_parser.parse_section(fh)
fh.close()

BeginOfLineSupportF = True
IndentationSupportF = False

txt = configuration.do({})

open("TestAnalyzer-configuration", "w").write(txt)
Beispiel #9
0
try:
    pass
    # import psyco
    # psyco.full()
except:
    pass

if __name__ == "__main__":
    try:
        quex.DEFINITIONS.check()

        # (*) Test Exceptions __________________________________________________
        if   exception_checker.do(sys.argv):
            # Done: Tests about exceptions have been performed
            pass

        # (*) Query ____________________________________________________________
        elif query.do(sys.argv):    
            # Done: Queries about unicode sets and regular expressions
            pass

        # (*) The Real Job _____________________________________________________
        elif command_line.do(sys.argv):
            # To do: Interpret input files and generate code or drawings.
            core.do() 

    except BaseException as instance:
        exception_checker.handle(instance)


def do(Argv):
    blackboard.setup.init(SETUP_INFO)
    assert False == command_line.do(Argv)
def do(simulated_argv):
    blackboard.setup.init(setup.SETUP_INFO)
    assert not command_line.do(simulated_argv)
Beispiel #12
0
def do(simulated_argv):
    if command_line.do(simulated_argv):
        query.do()
Beispiel #13
0
def do(simulated_argv):
    if command_line.do(simulated_argv):
        query.do()