Beispiel #1
0
def syntax_check(ast, M):
    'Ensure syntactic rules of language have been kept'
    #Ensure all functions and tuples have bounded arity
    Front.arity_check(ast)
    #Ensure all functions and conditionals end in return statements
    Front.return_check(ast)
    #Ensure builtins are not overridden
    Front.builtin_check(ast)
    return ast
Beispiel #2
0
def syntax_check(ast, M):
    'Ensure syntactic rules of language have been kept'
    #Ensure all functions and tuples have bounded arity
    Front.arity_check(ast)
    #Ensure all functions and conditionals end in return statements
    Front.return_check(ast)
    #Ensure builtins are not overridden
    Front.builtin_check(ast)
    return ast
Beispiel #3
0
def return_check(ast, M):
    'Ensure all functions and conditionals end in return statements'
    Front.return_check(ast)
    return ast
Beispiel #4
0
def return_check(ast, M):
    'Ensure all functions and conditionals end in return statements'
    Front.return_check(ast)
    return ast