#----------------------------------------------------------------- # pycparser: _build_tables.py # # A dummy for generating the lexing/parsing tables and and # compiling them into .pyc for faster execution in optimized mode. # Also generates AST code from the configuration file. # Should be called from the pycparser directory. # # Eli Bendersky [https://eli.thegreenplace.net/] # License: BSD #----------------------------------------------------------------- # Insert '.' and '..' as first entries to the search path for modules. # Restricted environments like embeddable python do not include the # current working directory on startup. import sys sys.path[0:0] = ['.', '..'] # Generate c_ast.py from _ast_gen import ASTCodeGenerator ast_gen = ASTCodeGenerator('_c_ast.cfg') ast_gen.generate(open('c_ast.py', 'w')) from pycparser import c_parser # Generates the tables # c_parser.CParser( lex_optimize=True, yacc_debug=False, yacc_optimize=True) # Load to compile into .pyc # import lextab import yacctab import c_ast
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
ply | Folder | 0755 |
|
|
__init__.py | File | 2.75 KB | 0644 |
|
_ast_gen.py | File | 10.31 KB | 0644 |
|
_build_tables.py | File | 1.01 KB | 0644 |
|
_c_ast.cfg | File | 4.16 KB | 0644 |
|
ast_transforms.py | File | 5.56 KB | 0644 |
|
c_ast.py | File | 30.71 KB | 0644 |
|
c_generator.py | File | 17.36 KB | 0644 |
|
c_lexer.py | File | 16.76 KB | 0644 |
|
c_parser.py | File | 71.95 KB | 0644 |
|
lextab.py | File | 8.3 KB | 0644 |
|
plyparser.py | File | 4.76 KB | 0644 |
|
yacctab.py | File | 200.83 KB | 0644 |
|