#----------------------------------------------------------------- # 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. # # Copyright (C) 2008-2015, Eli Bendersky # License: BSD #----------------------------------------------------------------- # Generate c_ast.py from _ast_gen import ASTCodeGenerator ast_gen = ASTCodeGenerator('_c_ast.cfg') ast_gen.generate(open('c_ast.py', 'w')) import sys sys.path[0:0] = ['.', '..'] 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 |
|
|
__init__.py | File | 2.83 KB | 0644 |
|
_ast_gen.py | File | 8.46 KB | 0644 |
|
_build_tables.py | File | 851 B | 0644 |
|
_c_ast.cfg | File | 4.08 KB | 0644 |
|
ast_transforms.py | File | 3.48 KB | 0644 |
|
c_ast.py | File | 22.79 KB | 0644 |
|
c_generator.py | File | 13.25 KB | 0644 |
|
c_lexer.py | File | 14.11 KB | 0644 |
|
c_parser.py | File | 60.75 KB | 0644 |
|
lextab.py | File | 7.08 KB | 0644 |
|
plyparser.py | File | 1.56 KB | 0644 |
|
yacctab.py | File | 123.33 KB | 0644 |
|