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')
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')
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')
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')
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')
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')
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')
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')
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')
def stmt_for_todowntochoice(self, p): p[0] = pas_ast.SomeType('stmt_for_todowntochoice')
def stmt_for(self, p): p[0] = pas_ast.SomeType('stmt_for')
def stmt_writeln_elem(self, p): #TODO: this rule is not really correct... just quickly written p[0] = pas_ast.SomeType('stmt_writeln_elem')
def stmt_break(self, p): p[0] = pas_ast.SomeType('stmt_break')
def stmt_tryfinally(self, p): p[0] = pas_ast.SomeType('stmt_tryfinally') #TODO: is object right here???
def stmt_tryexcept_onlist(self, p): p[0] = pas_ast.SomeType('stmt_tryexcept_onlist')
def stmt_case_labellist(self, p): p[0] = pas_ast.SomeType('stmt_case_labellist')
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')
def stmt_writeln(self, p): p[0] = pas_ast.SomeType('writeln')
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')
def stmt_case(self, p): #TODO: differs p[0] = pas_ast.SomeType('stmt_case')
def stmt_if(self, p): p[0] = pas_ast.SomeType('stmt_if')
def stmt_tryexcept_block(self, p): p[0] = pas_ast.SomeType('stmt_tryexcept_block')
def stmt_tryexcept_else(self, p): #TODO: could this not be used on other place too? p[0] = pas_ast.SomeType('stmt_tryexcept_else')
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')
def inheritedpropertyassignment(self, p): p[0] = pas_ast.SomeType('inheritedpropertyassignment')
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')
def stmt_raise(self, p): #TODO: the right at? p[0] = pas_ast.SomeType('stmt_raise')
def stmt_while(self, p): p[0] = pas_ast.SomeType('stmt_while')
def stmt_continue(self, p): p[0] = pas_ast.SomeType('stmt_continue')
def stmt_writeln_elem_list(self, p): p[0] = pas_ast.SomeType('stmt_writeln_elem_list')