Demonstrates using the AST for translation of the pattern matched results. More...
Go to the source code of this file.
Namespaces | |
examples.exp.ast_translate | |
Functions | |
def | examples.exp.ast_translate.float (state, input, index, length, data) |
def | examples.exp.ast_translate.sign (state, input, index, length, data) |
def | examples.exp.ast_translate.integer (state, input, index, length, data) |
def | examples.exp.ast_translate.fraction (state, input, index, length, data) |
def | examples.exp.ast_translate.esign (state, input, index, length, data) |
def | examples.exp.ast_translate.exponent (state, input, index, length, data) |
def | examples.exp.ast_translate.fn (input, result) |
Variables | |
string | examples.exp.ast_translate.title |
string | examples.exp.ast_translate.pattern |
string | examples.exp.ast_translate.input = '[ 123 ]' |
string | examples.exp.ast_translate.header = 'RESULT' |
int | examples.exp.ast_translate.testno = 0 |
examples.exp.ast_translate.exp = ApgExp(pattern, 'g') | |
examples.exp.ast_translate.result = exp.exec(input) | |
dictionary | examples.exp.ast_translate.data = {} |
examples.exp.ast_translate.match | |
examples.exp.ast_translate.end | |
Demonstrates using the AST for translation of the pattern matched results.
Also demonstrates how to use the AST in the replace() function (see apg_py/exp/exp.py.)
Definition in file ast_translate.py.