Ejemplo n.º 1
0
def const_element_generic(
        self, p
):  #TODO: ident could also in sub-elements #TODO: unit.ident is missing
    #TODO: i change ident to CONST_ID
    #TODO: added set_const... there are other const-types inside typeconstant... needs refactoring!!!
    #TODO: i removed set_const, i don't know why it is here?! split this type in other parts!
    p[0] = pas_ast.SomeType('const_element_generic')
Ejemplo n.º 2
0
def stmt_tryexcept_ondef(
        self, p):  #TODO: i think type is too much, i changed to simpletype
    #TODO: the statement ist opt
    #"""
    #ondef : ON ident COLON type DO statement_opt SEMICOLON
    #      | ON type DO statement_opt SEMICOLON
    #"""
    p[0] = pas_ast.SomeType('stmt_tryexcept_ondef')
Ejemplo n.º 3
0
def stmt_case_selector(
    self, p
):  #TODO: this seems not allow multiple colon-label-objects (also in recvariant)
    #"""
    #caseselector : empty
    #             | caselabellist COLON statement
    #"""
    p[0] = pas_ast.SomeType('stmt_case_selector')
Ejemplo n.º 4
0
def const_expr_ordinal(
        self,
        p):  #TODO: i'm not happy with a universal constexpr, so i started this
    #TODO: i changed ident to CONST_ID!
    #TODO: added sizeof... todo, refactor this, was only a quick hack for now!
    ###"""
    #TODO: i added LOW and HIGH Here... check if this is correct for all case's
    #TODO: i temporary removed LPAREN & RPAREN, because of conflicts with set of and enumerated-type #TODO: implement this in future
    p[0] = pas_ast.SomeType('const_expr_ordinal')
Ejemplo n.º 5
0
def const_expr_set_elem(
    self, p
):  #TODO: should this not better a ordinal? #TODO: change to const_expr_generic
    #TODO: i added LPAREN RPAREN, but there are more place, where this is missing... because, the left const, couldn't start with LPAREN RPAREN
    #"""
    #set_const_elem : constexpr
    #               | constexpr DOTDOT constexpr
    #"""
    p[0] = pas_ast.SomeType('const_expr_set_elem')
Ejemplo n.º 6
0
def stmt_proc_call(
        self,
        p):  #TODO: i removed period because it is inside of variable for now
    #"""
    #proc_call
    #    : variable  /* instead if proc_ident param_list */
    #    | variable PERIOD proc_call
    #    /* | variable PERIOD property ASSIGNMENT expression */
    #"""
    p[0] = pas_ast.SomeType('stmt_proc_call')
Ejemplo n.º 7
0
def stmt_case_label(self, p):
    #TODO: | CHAR_CONST instead of STRING_LITERAL
    #TODO: here are char also possible... is then a const_char, a ordinal???
    #TODO: i temporarly added CHAR_CONST here
    #TODO: does CHAR_CONST allow DOTDOT???
    #TODO: i changed constexpr to const_expr_ordinal
    #"""
    #caselabel : constexpr
    #          | constexpr DOTDOT constexpr
    #"""
    p[0] = pas_ast.SomeType('caselabel')
Ejemplo n.º 8
0
def const_expr_typed_elem(
    self, p
):  #TODO: set_const not in ref here #TODO: remove or replace constexpr here
    #TODO: i replaced constexpr with const_expr_generic... but, i feel this is not complety right now!!!
    #"""
    #typedconstant : constexpr
    #              | arrayconstant
    #              | recordconstant
    #              | set_const
    #"""
    p[0] = pas_ast.SomeType('const_expr_typed_elem')
Ejemplo n.º 9
0
def stmt_with(self, p):  #TODO: in o-pas-ref this is identlist
    #TODO: refactor, the quick hack with AS stmt
    p[0] = pas_ast.SomeType('stmt_with')
Ejemplo n.º 10
0
def stmt_for_todowntochoice(self, p):
    p[0] = pas_ast.SomeType('stmt_for_todowntochoice')
Ejemplo n.º 11
0
def stmt_for(self, p):
    p[0] = pas_ast.SomeType('stmt_for')
Ejemplo n.º 12
0
def stmt_writeln_elem(self, p):
    #TODO: this rule is not really correct... just quickly written
    p[0] = pas_ast.SomeType('stmt_writeln_elem')
Ejemplo n.º 13
0
def stmt_break(self, p):
    p[0] = pas_ast.SomeType('stmt_break')
Ejemplo n.º 14
0
def stmt_tryfinally(self, p):
    p[0] = pas_ast.SomeType('stmt_tryfinally')  #TODO: is object right here???
Ejemplo n.º 15
0
def stmt_tryexcept_onlist(self, p):
    p[0] = pas_ast.SomeType('stmt_tryexcept_onlist')
Ejemplo n.º 16
0
def stmt_case_labellist(self, p):
    p[0] = pas_ast.SomeType('stmt_case_labellist')
Ejemplo n.º 17
0
def stmt_case_stmt(
    self, p
):  #TODO: this seems not allow multiple colon-label-objects (also in recvariant)
    #TODO: are here multiple statements possible, without begin end???
    p[0] = pas_ast.SomeType('stmt_case_stmt')
Ejemplo n.º 18
0
def stmt_writeln(self, p):
    p[0] = pas_ast.SomeType('writeln')
Ejemplo n.º 19
0
def stmt_case_selector_list(
        self, p
):  #TODO: i think here are multiple SEMIICOLONs possible, so i moved it
    p[0] = pas_ast.SomeType('stmt_case_selector_list')
Ejemplo n.º 20
0
def stmt_case(self, p):  #TODO: differs
    p[0] = pas_ast.SomeType('stmt_case')
Ejemplo n.º 21
0
def stmt_if(self, p):
    p[0] = pas_ast.SomeType('stmt_if')
Ejemplo n.º 22
0
def stmt_tryexcept_block(self, p):
    p[0] = pas_ast.SomeType('stmt_tryexcept_block')
Ejemplo n.º 23
0
def stmt_tryexcept_else(self,
                        p):  #TODO: could this not be used on other place too?
    p[0] = pas_ast.SomeType('stmt_tryexcept_else')
Ejemplo n.º 24
0
def stmt_case_else(
        self,
        p):  #TODO: is this in o-pas-ref? #TODO: possible use a generic else
    #TODO: i changed statement_opt to statementlist_opt
    p[0] = pas_ast.SomeType('stmt_case_else')
Ejemplo n.º 25
0
def inheritedpropertyassignment(self, p):
    p[0] = pas_ast.SomeType('inheritedpropertyassignment')
Ejemplo n.º 26
0
def stmt_repeat(
    self, p
):  #TODO: why here stmt list? and below only stmt? TODO: differs with o-pas-ref
    p[0] = pas_ast.SomeType('stmt_repeat')
Ejemplo n.º 27
0
def stmt_raise(self, p):
    #TODO: the right at?
    p[0] = pas_ast.SomeType('stmt_raise')
Ejemplo n.º 28
0
def stmt_while(self, p):
    p[0] = pas_ast.SomeType('stmt_while')
Ejemplo n.º 29
0
def stmt_continue(self, p):
    p[0] = pas_ast.SomeType('stmt_continue')
Ejemplo n.º 30
0
def stmt_writeln_elem_list(self, p):
    p[0] = pas_ast.SomeType('stmt_writeln_elem_list')