diff --git a/modelica_parser/src/modelica_parser.g b/modelica_parser/src/modelica_parser.g index 14f39de21a9..0157727d73c 100644 --- a/modelica_parser/src/modelica_parser.g +++ b/modelica_parser/src/modelica_parser.g @@ -103,7 +103,6 @@ class_type : class_specifier : ( string_comment composition END! IDENT! | EQUALS^ base_prefix name_path ( array_subscripts )? ( class_modification )? comment - | EQUALS^ overloading | EQUALS^ enumeration ) ; @@ -112,9 +111,6 @@ base_prefix: type_prefix ; -overloading: - OVERLOAD^ LPAR! name_list RPAR! comment - ; name_list: name_path (COMMA! name_path)* ; @@ -554,7 +550,7 @@ simple_expression ! : ; /* Code quotation mechanism */ code_expression ! : - CODE LPAR ((expression RPAR)=> e:expression | m:modification | el:element + CODE LPAR ((expression RPAR)=> e:expression | m:modification | el:element (SEMICOLON!)? | eq:code_equation_clause | ieq:code_initial_equation_clause | alg:code_algorithm_clause | ialg:code_initial_algorithm_clause ) RPAR diff --git a/modeq/absyn.rml b/modeq/absyn.rml index 3b53eecdf04..ff1830fa4c8 100644 --- a/modeq/absyn.rml +++ b/modeq/absyn.rml @@ -71,10 +71,6 @@ module Absyn: | ENUMERATION of EnumLiteral list * Comment option (* comment*) - - | OVERLOAD of Path list (* function names*) - * Comment option - (** The `ClassDef' type contains the definition part of a class *) (** declaration. The definition is either explicit, with a list of *) (** parts (`public', `protected', `equation' and `algorithm'), or it *) diff --git a/modeq/absyn_builder/walker.g b/modeq/absyn_builder/walker.g index be10588f2c8..46ebfb509ec 100644 --- a/modeq/absyn_builder/walker.g +++ b/modeq/absyn_builder/walker.g @@ -206,8 +206,7 @@ class_specifier returns [void* ast] ast = Absyn__PARTS(comp,cmt ? mk_some(cmt) : mk_none()); } ) - | #(EQUALS ( ast = derived_class | ast = enumeration | ast = overloading)) - + | #(EQUALS ( ast = derived_class | ast = enumeration)) ; derived_class returns [void *ast] @@ -273,29 +272,6 @@ enumeration_literal returns [void *ast] : } ; -overloading returns [void *ast] -{ - l_stack el_stack; - void *el = 0; - void *cmt = 0; -} - : - #(OVERLOAD - el = name_path - { el_stack.push(el); } - ( - el = name_path - { el_stack.push(el); } - - )* - (cmt=comment)? - ) - { - ast = Absyn__OVERLOAD(make_rml_list_from_stack(el_stack), - cmt ? mk_some(cmt) : mk_none()); - } - ; - composition returns [void* ast] { void* el = 0; diff --git a/modeq/dump.rml b/modeq/dump.rml index 31c6772f74c..624b4a98650 100644 --- a/modeq/dump.rml +++ b/modeq/dump.rml @@ -172,15 +172,6 @@ relation unparse_class_str: (int, Absyn.Class,string,string,string) => string = ------------------------------- unparse_class_str(i, Absyn.CLASS(n,p,f,e,r,Absyn.ENUMERATION(l,cmt)),fi,re,io) => str - rule indent_str(i) => is & - select_string(p, "partial ", "") => s1 & - select_string(f, "final ", "") => s2 & - unparse_restriction_str (r) => s3 & - print_list_str(l,Absyn.path_string,",") => s4 & - unparse_comment_option(cmt) => s5 & - Util.string_append_list([is,s1,s2,re,io,s3," ",n,"= overload(",s4,")",s5]) => str - ------------------------------- - unparse_class_str(i, Absyn.CLASS(n,p,f,e,r,Absyn.OVERLOAD(l,cmt)),fi,re,io) => str end relation unparse_comment_option: (Absyn.Comment option) => string = @@ -1940,9 +1931,10 @@ relation print_exp_str : Absyn.Exp => string = ------------------------------------ print_exp_str (e as Absyn.RANGE(start,SOME(step),stop)) => s - rule print_code_str(c) => res + rule print_code_str(c) => res & + Util.string_append_list(["Code(",res,")"]) => res' -------------------------- - print_exp_str ( Absyn.CODE(c)) => res + print_exp_str ( Absyn.CODE(c)) => res' axiom print_exp_str (_) => "#UNKNOWN EXPRESSION#" diff --git a/modeq/explode.rml b/modeq/explode.rml index ac838f969bb..911e47f8f1f 100644 --- a/modeq/explode.rml +++ b/modeq/explode.rml @@ -89,7 +89,6 @@ module SCode : * Absyn.ArrayDim option * Mod | ENUMERATION of Ident list - | OVERLOAD of Absyn.Path list (** The major difference between these types and their `Absyn' *) (** counterparts is that the `PARTS' constructor contains separate *) @@ -268,7 +267,6 @@ relation elab_classdef: Absyn.ClassDef => ClassDef = -------------------------- elab_classdef(Absyn.ENUMERATION(lst,_)) => ENUMERATION(lst') - axiom elab_classdef(Absyn.OVERLOAD(lst,_)) => OVERLOAD(lst) end relation elab_enumlist:(Absyn.EnumLiteral list) => Ident list = diff --git a/modeq/inst.rml b/modeq/inst.rml index a5f1b33044b..ca4b40d34ed 100644 --- a/modeq/inst.rml +++ b/modeq/inst.rml @@ -2593,15 +2593,6 @@ relation implicit_function_instantiation : (Env.Env, Types.Mod, Prefix.Prefix, Connect.Sets, SCode.Class,InstDims, bool) => (Env.Env, DAE.Element list) = - rule (* Overloaded functions *) - inst_overloaded_functions(env,n,funcnames) => (env',daefuncs) - ----------------------------- - implicit_function_instantiation(env,mod,pre,csets, - c as SCode.CLASS(n,_,_, restr as SCode.R_FUNCTION, - SCode.OVERLOAD(funcnames)), - inst_dims, false) - => (env', daefuncs) - rule (*Prefix.prefix_add(n,[],pre) => pre' &*) inst_class(env, mod, pre, csets, c, inst_dims, true,INNER_CALL) => (dae, _, csets', ty, st) &