Beispiel #1
0
def p_import_spec_list(p):
    '''import_spec_list : import_spec_list NEWLINE import_spec
        | import_spec'''
    if len(p) > 2:
        p[0] = st.ndlappend(p[1], p[3], p[2])
    else:
        p[0] = [p[1]]
Beispiel #2
0
def p_state_decl_lockable_list(p):
    '''state_decl_lockable_list : state_decl_lockable_list state_decl_lockable
        | state_decl_lockable '''
    # Returns simple list of ND_state_block & ND_state_block_locked
    if len(p) > 2:
        p[0] = st.ndlappend(p[1], p[2])
    else:
        p[0] = [p[1]]
Beispiel #3
0
def p_sens_act_entries(p):
    '''sens_act_entries : sens_act_entries sens_act_entry
        | sens_act_entries comment
        | sens_act_entry '''
    # simple list
    if len(p) > 2:
        p[0] = st.ndlappend(p[1], p[2])
    else:
        p[0] = [p[1]]
Beispiel #4
0
def p_beh_entries(p):
    '''beh_entries : beh_entries beh_entry
        | beh_entries comment
        | beh_entry'''
    # simple list
    if len(p) > 2:
        p[0] = st.ndlappend(p[1],p[2])
    else:
        p[0] = [p[1]]
Beispiel #5
0
def p_instance_alloc_list(p):
    '''instance_alloc_list : instance_alloc_list ',' instance_alloc
        | instance_alloc'''
    # Returns a simple list of instantiations.
    # Lexically, the list represents one line of source. 
    if len(p) > 2:
        p[0] = st.ndlappend(p[1], p[3])
    else:
        p[0] = [p[1]]
Beispiel #6
0
def p_loadable_list_recurse(p):
    '''loadable_list : loadable_list NEWLINE loadable
        | loadable_list NEWLINE comment '''
    # simple list
    p[0] = st.ndlappend(p[1], p[3]) 
Beispiel #7
0
def p_device_list_recurse(p):
    '''device_list : device_list NEWLINE device
        | device_list NEWLINE comment '''
    # simple list
    p[0] = st.ndlappend(p[1], p[3])
Beispiel #8
0
def p_state_and_fcn_decls_recurse_cmt(p):
    '''state_and_fcn_decls : state_and_fcn_decls comment NEWLINE '''
    # Add the merge test code here.
    p[0] = st.ndlappend(p[1], p[2])  
Beispiel #9
0
def p_state_and_fcn_decls_recurse(p):
    '''state_and_fcn_decls : state_and_fcn_decls var_block_lockable
        | state_and_fcn_decls function_def '''
    # Returns a simple list. 
    p[0] = st.ndlappend(p[1], p[2])
Beispiel #10
0
def p_const_spec_list_recurse(p):
    'const_spec_list : const_spec_list NEWLINE const_spec'
    # simple list
    p[0] = st.ndlappend(p[1], p[3], p[2])
Beispiel #11
0
def p_type_spec_list_recurse(p):
    'type_spec_list : type_spec_list NEWLINE type_spec'
    p[0] = st.ndlappend(p[1], p[3], p[2])    
Beispiel #12
0
def p_type_const_list_recurse(p):
    '''type_const_list : type_const_list type_const_block'''
    p[0] = st.ndlappend(p[1], p[2])
Beispiel #13
0
def p_import_list_recurse(p):
    '''import_list : import_list import_block
        | import_list comment NEWLINE '''
    p[0] = st.ndlappend(p[1], p[2])