2 * Translator from Modelica 2.x to flat Modelica
\r
4 * Copyright (C) 2005 - 2007 Imagine S.A.
\r
5 * For more information or commercial use please contact us at www.amesim.com
\r
7 * This program is free software; you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation; either version 2
\r
10 * of the License, or (at your option) any later version.
\r
12 * This program is distributed in the hope that it will be useful,
\r
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 * GNU General Public License for more details.
\r
17 * You should have received a copy of the GNU General Public License
\r
18 * along with this program; if not, write to the Free Software
\r
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
23 (* Compilation message translation dictionary *)
\r
26 ("_UnknownIdentifier",
\r
27 [("ENG", "Unknown identifier")]);
\r
28 ("_EnumTypeDefWithDuplicLit",
\r
29 [("ENG", "Enumeration type definition with duplicated literal")]);
\r
30 ("_NotYetImplemented",
\r
31 [("ENG", "Use of not yet implemented feature:")]);
\r
32 ("_EncapsulatedCannotBeAppliedTo",
\r
33 [("ENG", "\"encapsulated\" keyword cannot be applied to")]);
\r
34 ("_UnspecifiedEnumLits",
\r
35 [("ENG", "Enumeration literals not specified")]);
\r
37 [("ENG", "command line")]);
\r
38 ("_CharacterPosition",
\r
39 [("ENG", "Character position")]);
\r
41 [("ENG", "Line number")]);
\r
43 [("ENG", "Column number")]);
\r
45 [("ENG", "Context")]);
\r
46 ("_UntranslatedText",
\r
47 [("ENG", "Untranslated text")]);
\r
48 ("_NonBooleanIfCondExpr",
\r
49 [("ENG", "Non-Boolean \"if\" condition expression")]);
\r
50 ("_TypeConflictsInIfAlternExprs",
\r
51 [("ENG", "If alternative expressions must be of the same type")]);
\r
52 ("_InvalidTypeInRangeExpr",
\r
53 [("ENG", "Invalid type of element in range expression")]);
\r
54 ("_NonIntegerRangeExpr",
\r
55 [("ENG", "Non-integer range expression")]);
\r
56 ("_TypeConflictsInVectorExpr",
\r
57 [("ENG", "Elements of different types in vector expression")]);
\r
58 ("_NonPredefTypeVectorExpr",
\r
59 [("ENG", "Only vector expressions of predefined type elements are supported")]);
\r
60 ("_ArrayDimMustAgreeToPerform",
\r
61 [("ENG", "Array dimensions must agree to perform")]);
\r
62 ("_ImplicitIterRange",
\r
63 [("ENG", "Implicit iteration range")]);
\r
65 [("ENG", "Unary operator +")]);
\r
67 [("ENG", "Matrix expression")]);
\r
69 [("ENG", "Binary operator <>")]);
\r
70 ("_BinaryOperEQUEQU",
\r
71 [("ENG", "Binary operator ==")]);
\r
73 [("ENG", "expression statement")]);
\r
74 ("_TopLevelAlgorithm",
\r
75 [("ENG", "algorithmic statement")]);
\r
77 [("ENG", "within clause")]);
\r
79 [("ENG", "import clause")]);
\r
81 [("ENG", "Invalid \"type\" definition")]);
\r
83 [("ENG", "Short class definition")]);
\r
84 ("_ClassDefByExtension",
\r
85 [("ENG", "Class definition by extension")]);
\r
86 ("_InvalidUseOfEnumKeyword",
\r
87 [("ENG", "Invalid use of \"enumeration\" keyword")]);
\r
88 ("_ClassExtendsDef",
\r
89 [("ENG", "Class definition by extension")]);
\r
90 ("_OperAppliedToNonNumericExpr",
\r
91 [("ENG", "operator applied to non numeric expression")]);
\r
92 ("_PowerOperOnNonSquareArray",
\r
93 [("ENG", "Cannot perform power operation on non square array")]);
\r
94 ("_ArrayDimMustAgreeToPerform",
\r
95 [("ENG", "Array dimensions must agree to perform")]);
\r
96 ("_EachAppliedToNonArrayElem",
\r
97 [("ENG", "Cannot apply \"each\" keyword to non-array type element")]);
\r
98 ("_EquTermsNotOfTheSameType",
\r
99 [("ENG", "Equation terms must be of the same type")]);
\r
100 ("_ClassElemFoundInExpr",
\r
101 [("ENG", "Component element expected, but class element found")]);
\r
102 ("_InvalidExtensionDef",
\r
103 [("ENG", "Invalid extension definition")]);
\r
104 ("_VariablityConflictsInCompDef",
\r
105 [("ENG", "Variability conflicts in component definition")]);
\r
106 ("_CausalityConflictsInCompDef",
\r
107 [("ENG", "Causality conflicts in component definition")]);
\r
108 ("_TypeConflictsInAssign",
\r
109 [("ENG", "Type conflicts in assignment expression")]);
\r
110 ("_InvalidExprInElemModif",
\r
111 [("ENG", "Invalid expression in element modification")]);
\r
112 ("_FieldAccessInElemModifExpr",
\r
113 [("ENG", "Field access in element modification expression")]);
\r
114 ("_ElementRedeclaration",
\r
115 [("ENG", "Element redeclaration")]);
\r
116 ("_InvalidTypeOfClassSpec",
\r
117 [("ENG", "Invalid type of class specifier")]);
\r
118 ("_RedeclarePredefTypeAttrib",
\r
119 [("ENG", "Redeclaration not allowed for predefined type attributes")]);
\r
120 ("_InvalidClassElemModif",
\r
121 [("ENG", "Invalid modification of class element")]);
\r
122 ("_FinalElemModifNotAllowed",
\r
123 [("ENG", "Cannot modify final element")]);
\r
124 ("_InvalidElemModifDef",
\r
125 [("ENG", "Invalid element modification definition")]);
\r
126 ("_ArrayDimMismatchInEqu",
\r
127 [("ENG", "Array dimensions do not agree in equation")]);
\r
128 ("_ComponentTypeEqu",
\r
129 [("ENG", "Component type equation")]);
\r
131 [("ENG", "Algorithm clause")]);
\r
132 ("_InvalidKeyWordEndInExpr",
\r
133 [("ENG", "Invalid use of expression \"end\"")]);
\r
134 ("_InvalidTypeOfFuncValueInEqu",
\r
135 [("ENG", "Invalid type of function value in equation")]);
\r
136 ("_FuncArgumentReduction",
\r
137 [("ENG", "Function argument reduction")]);
\r
138 ("_TooManyArgsInFuncCall",
\r
139 [("ENG", "Too many arguments in function call")]);
\r
140 ("_FuncCallWithDuplicateArg",
\r
141 [("ENG", "Function call with duplicate named argument")]);
\r
142 ("_MixedPositAndNamedFuncArgPass",
\r
143 [("ENG", "Mixed positional and named function argument passing not allowed")]);
\r
144 ("_NonInputFuncArgElem",
\r
145 [("ENG", "Function called with non input argument")]);
\r
146 ("_NoInnerDeclForOuterElem",
\r
147 [("ENG", "Missed inner declaration for outer element")]);
\r
149 [("ENG", "Block element")]);
\r
150 ("_ExpandableConnector",
\r
151 [("ENG", "Expandable connector")]);
\r
152 ("_PredefinedTypeAttribModif",
\r
153 [("ENG", "Modification of predefined type attribute")]);
\r
154 ("_UnsupportedFeature",
\r
155 [("ENG", "Use of unsupported feature:")]); (*to be documented*)
\r
156 ("_OperAppliedToNonBoolExpr",
\r
157 [("ENG", "operator applied to non-Boolean expression")]);
\r
159 [("ENG", "\"type\" definition")]);
\r
161 [("ENG", "addition operation")]);
\r
162 ("_TypeInconsistWithComparOper",
\r
163 [("ENG", "Type of operands inconsistent with comparison operation")]);
\r
164 ("_OperBetweenScalarAndArray",
\r
165 [("ENG", "operator between scalar and array type elements")]);
\r
167 [("ENG", "addition")]);
\r
169 [("ENG", "subtraction")]);
\r
170 ("_TypeInconsistentWithDivOper",
\r
171 [("ENG", "Type of operands inconsistent with division operation")]);
\r
172 ("_ArrayDimsNonCompatibleWithMult",
\r
173 [("ENG", "Arrays do not have compatible dimensions to be multiplied")]);
\r
175 [("ENG", "ERROR")]);
\r
177 [("ENG", "element expected")]);
\r
178 ("_UseOfTypePrefixInShortClassDef",
\r
179 [("ENG", "Use of type prefix not allowed in short class definition")]);
\r
180 ("_UseOfSubsInShortClassDef",
\r
181 [("ENG", "Use of subscripts not allowed in short class definition")]);
\r
182 ("_NonEmptyFuncCallUsedAsAnEqu",
\r
183 [("ENG", "Non-empty function call cannot be used as an equation")]);
\r
184 ("_DuplicatedModifOfElem",
\r
185 [("ENG", "Duplicated modification of element")]);
\r
186 ("_ComponentTypeElemInstant",
\r
187 [("ENG", "Component type element instantiation")]);
\r
188 ("_PredefinedTypeElemInstant",
\r
189 [("ENG", "Predefined type element instantiation")]);
\r
191 [("ENG", "Component")]);
\r
192 ("_CannotAccessProtectElem",
\r
193 [("ENG", "Cannot access protected element")]);
\r
194 ("_CannotAccessOuterElem",
\r
195 [("ENG", "Cannot access outer element")]);
\r
196 ("_UnknownFunction",
\r
197 [("ENG", "Unknown function")]);
\r
198 ("_ZeroRaisedToTheZeroPower",
\r
199 [("ENG", "Zero raised to the zero power")]);
\r
200 ("_IntegerRaisedToIntegerPower",
\r
201 [("ENG", "Integer raised to an integer power")]);
\r
202 ("_RealRaisedToIntegerPower",
\r
203 [("ENG", "Real raised to an integer power")]);
\r
204 ("_VectorRaisedToIntegerPower",
\r
205 [("ENG", "Vector raised to an integer power")]);
\r
206 ("_NonIntegerArrayDim",
\r
207 [("ENG", "Non-Integer array dimension")]);
\r
209 [("ENG", "Enumeration type")]);
\r
211 [("ENG", "String type")]);
\r
213 [("ENG", "Boolean type")]);
\r
214 ("_BooleanOperator",
\r
215 [("ENG", "Boolean operator")]);
\r
216 ("_DynamicArrayType",
\r
217 [("ENG", "Dynamic array type")]);
\r
218 ("_StaticArrayType",
\r
219 [("ENG", "Static array type")]);
\r
221 [("ENG", "Instance type")]);
\r
222 ("_ConditionalEqu",
\r
223 [("ENG", "Conditional equation")]);
\r
224 ("_FieldAccessExpr",
\r
225 [("ENG", "Field access expression")]);
\r
226 ("_IndexedAccessExpr",
\r
227 [("ENG", "Indexed access expression")]);
\r
229 [("ENG", "Range expression")]);
\r
231 [("ENG", "Expression")]);
\r
233 [("ENG", "Expression of type")]);
\r
235 [("ENG", "Tuple expression")]);
\r
237 [("ENG", "Vector reduction")]);
\r
239 [("ENG", "Loop variable")]);
\r
240 ("_PredefinedTypeClassRef",
\r
241 [("ENG", "Predefined type class reference")]);
\r
242 ("_NonExternalCallClassRef",
\r
243 [("ENG", "Use of class reference in expression is allowed only for external function call")]);
\r
244 ("_ExternalProcedureCall",
\r
245 [("ENG", "External procedure call")]);
\r
246 ("_ExternalCallToLanguage",
\r
247 [("ENG", "External call to language")]);
\r
248 ("_ExternalCallWithLeftHandSideExpr",
\r
249 [("ENG", "External call with left hand side expression")]);
\r
250 ("_AssignExprInElemModif",
\r
251 [("ENG", "Assignment expression in element modification")]);
\r
252 ("_CannotSubscriptANonArrayTypeElem",
\r
253 [("ENG", "Cannot subscript a non array type element")]);
\r
254 ("_NonIntegerArraySubscript",
\r
255 [("ENG", "Non-Integer array subscript")]);
\r
256 ("_RangeStepValueCannotBeNull",
\r
257 [("ENG", "Range step value cannot be null")]);
\r
259 [("ENG", "Type of A")]);
\r
261 [("ENG", "Type of B")]);
\r
263 [("ENG", "Source")]);
\r
265 [("ENG", "Class name")]);
\r
266 ("_FunctionCallExpr",
\r
267 [("ENG", "Function call expression")]);
\r
269 [("ENG", "Vector expression")]);
\r
271 [("ENG", "Expression kind")]);
\r
272 ("_TypeOfThenBranche",
\r
273 [("ENG", "Type of then branche")]);
\r
274 ("_TypeOfElseBranche",
\r
275 [("ENG", "Type of else branche")]);
\r
277 [("ENG", "Type prefix")]);
\r
279 [("ENG", "Element found")]);
\r
280 ("_TypeSpecifierVariability",
\r
281 [("ENG", "Type specifier variability")]);
\r
282 ("_TypeSpecifierCausality",
\r
283 [("ENG", "Type specifier causality")]);
\r
284 ("_TypeOfCondition",
\r
285 [("ENG", "Type of \"condition\"")]);
\r
287 [("ENG", "Type found")]);
\r
288 ("_ComponentElement",
\r
289 [("ENG", "Component element")]);
\r
291 [("ENG", "Expected type")]);
\r
293 [("ENG", "Class element")]);
\r
295 [("ENG", "Array type")]);
\r
296 ("_ClassSpecifier",
\r
297 [("ENG", "Class specifier")]);
\r
298 ("_TypeOfFuncValue",
\r
299 [("ENG", "Type of function value")]);
\r
300 ("_TypeOfFunctionOutput",
\r
301 [("ENG", "Type of function output")]);
\r
302 ("_CannotInheritFrom",
\r
303 [("ENG", "Cannot inherit from")]);
\r
304 ("_ComponentTypeElement",
\r
305 [("ENG", "Component type element")]);
\r
306 ("_PredefinedTypeElement",
\r
307 [("ENG", "Predefined type element")]);
\r
308 ("_AlreadyDeclaredInParentClass",
\r
309 [("ENG", "already declared in parent class")]);
\r
310 ("_InheritFromDiffClassKindsNotAllowed",
\r
311 [("ENG", "Inheritance from different class kinds not allowed")]);
\r
312 ("_MismatchingTypes",
\r
313 [("ENG", "Mismatching types")]);
\r
314 ("_InheritFromFunctionNotAllowed",
\r
315 [("ENG", "Inheritance from function not allowed")]);
\r
316 ("_InvalidAnnOfInvFunc",
\r
317 [("ENG", "Invalid annotation of inverse functions:")]);
\r
318 ("_RedeclarationNotAllowed",
\r
319 [("ENG", "Redeclaration not allowed")]);
\r
320 ("_UseOfEachKeywordNotAllowed",
\r
321 [("ENG", "Use of \"each\" keyword not allowed")]);
\r
322 ("_UseOfFinalKeywordNotAllowed",
\r
323 [("ENG", "Use of \"final\" keyword not allowed")]);
\r
324 ("_UnspecifiedModification",
\r
325 [("ENG", "Unspecified modification")]);
\r
326 ("_InvalidModifExpr",
\r
327 [("ENG", "Invalid modification expression")]);
\r
328 ("_InvalidFuncCallExpr",
\r
329 [("ENG", "Invalid function call expression")]);
\r
330 ("_InvalidTypeOfFuncCallExpr",
\r
331 [("ENG", "Invalid type of function call expression")]);
\r
333 [("ENG", "Class type")]);
\r
335 [("ENG", "Function")]);
\r
336 ("_FuncArgReductionNotAllowed",
\r
337 [("ENG", "Function argument reduction not allowed")]);
\r
338 ("_CannotUseUnnamedFuncArg",
\r
339 [("ENG", "Cannot use unnamed function argument")]);
\r
340 ("_InvalidFuncArgModif",
\r
341 [("ENG", "Invalid function argument modification")]);
\r
342 ("_UnknownArgName",
\r
343 [("ENG", "Unknown argument name")]);
\r
344 ("_CannotUseCausPrefixInGenClass",
\r
345 [("ENG", "Input or output component found in generic class")]);
\r
346 ("_FuncDefInNonInstantiatedClass",
\r
347 [("ENG", "Function defined in non instantiated class")]);
\r
348 ("_InvalidTypeOfArgInConnectStat",
\r
349 [("ENG", "Invalid type of argument in connect statement")]);
\r
350 ("_CannotConnectFlowAndNonFlowComp",
\r
351 [("ENG", "Cannot connect flow and non-flow components")]);
\r
352 ("_InvalidTypeOfWhenCond",
\r
353 [("ENG", "Invalid type of when condition")]);
\r
354 ("_NameResolution",
\r
355 [("ENG", "Name resolution")]);
\r
356 ("_InstantiationOfComponent",
\r
357 [("ENG", "Instantiation of component")]);
\r
358 ("_CodeGenerationForComponent",
\r
359 [("ENG", "Code generation for component")]);
\r
361 [("ENG", "Execution step")]);
\r
362 ("_MissingDeclEquForFixedId",
\r
363 [("ENG", "Missing declaration equation for fixed identifier")]);
\r
364 ("_ComponentFuncInvocation",
\r
365 [("ENG", "Component function invocation")]);
\r
366 ("_FuncWithManyOutputs",
\r
367 [("ENG", "Function with many outputs")]);
\r
368 ("_InstantiationOfClass",
\r
369 ["ENG", "Instantiation of class"]);
\r
370 ("_CodeGenerationForClass",
\r
371 ["ENG", "Code generation for class"]);
\r
372 ("_InstanceUsedInConnection",
\r
373 [("ENG", "instance used in connection statement")]);
\r
375 [("ENG", "Unclosed")]);
\r
376 ("_InvalidMatrixConstruct",
\r
377 [("ENG", "Invalid matrix construction")]);
\r
378 ("_InvalidArrayConstruct",
\r
379 [("ENG", "Invalid array construction")]);
\r
381 [("ENG", "Syntax error")]);
\r
382 ("_SyntacticAnalysis",
\r
383 [("ENG", "Syntactic analysis")]);
\r
385 [("ENG", "Predefined type")]);
\r
386 ("_WhenClausesCannotBeNested",
\r
387 [("ENG", "When clauses cannot be nested")]);
\r
388 ("_InvalidWhenEquation",
\r
389 [("ENG", "Invalid form of equation within when clause")]);
\r
390 ("_WhenConditionMustBeDiscrete",
\r
391 [("ENG", "When condition must be discrete-time expression")]);
\r
392 ("_ArgTypeMismatch",
\r
393 [("ENG", "Argument type mismatch")]);
\r
394 ("_VariabilityOfA",
\r
395 [("ENG", "Variability of A")]);
\r
396 ("_VariabilityOfB",
\r
397 [("ENG", "Variability of B")]);
\r
398 ("_VariabilityConflicts",
\r
399 [("ENG", "Variability conflicts")]);
\r
400 ("_CannotUseNamedArgWithBuiltInOper",
\r
401 [("ENG", "Cannot use named argument with a built-in operator or function")]);
\r
402 ("_OperArgMustBeAVar",
\r
403 [("ENG", "operator argument must be a variable")]);
\r
404 ("_ArgVariabilityMismatch",
\r
405 [("ENG", "Argument variability mismatch")]);
\r
406 ("_ExpectedVariability",
\r
407 [("ENG", "Expected variability")]);
\r
408 ("_VariabilityFound",
\r
409 [("ENG", "Variability found")]);
\r
410 ("_EquNotAllowedInTheDefOf",
\r
411 [("ENG", "Equations not allowed in the definition of")]);
\r
412 ("_OperCannotBeUsedWithinFuncDef",
\r
413 [("ENG", "operator cannot be used within function definition")]);
\r
414 ("_ArgDimMismatchInVectCall",
\r
415 [("ENG", "Arguments dimensions mismatch in vectorized function call")]);
\r
416 ("_ArgDimMismatch",
\r
417 [("ENG", "Argument dimension mismatch")]);
\r
418 ("_TooFewArgsInFuncCall",
\r
419 [("ENG", "Too few arguments in function call")]);
\r
420 ("_LHSOfDiscreteEquMustBeAVar",
\r
421 [("ENG", "Left hand side of discrete equation must be a variable")]);
\r
422 ("_InvalidVarOfRangeExpr",
\r
423 [("ENG", "Invalid variability of range expression")]);
\r
424 ("_RealExponentOfNegativeNumber",
\r
425 [("ENG", "Real exponentiation of negative number")]);
\r
426 ("_ZeroRaisedToNegativePower",
\r
427 [("ENG", "Zero raised to negative power")]);
\r
428 ("_IllegalCharacter",
\r
429 [("ENG", "Illegal character")]); (*to be documented*)
\r
430 ("_InvalidExternalFuncName",
\r
431 [("ENG", "Invalid external function name")]); (*to be documented*)
\r
432 ("_LHSOfExternalCall",
\r
433 [("ENG", "Left hand side of external call")]); (*to be documented*)
\r
434 ("_InvalidArgOfExternalCall",
\r
435 [("ENG", "Invalid argument of external call")]); (*to be documented*)
\r
436 ("_CannotAccessToPredefTypeAttrib",
\r
437 [("ENG", "Cannot access predefined type attribute")]);
\r
438 ("_InvalidCondEquation",
\r
439 [("ENG", "Invalid conditional equation")]);
\r
440 ("_IndexOutOfBound",
\r
441 [("ENG", "Index out of bound")]);
\r
442 ("_DivisionByZero",
\r
443 [("ENG", "Division by zero")]);
\r
444 ("_PredefinedOperator",
\r
445 [("ENG", "Predefined operator")]);
\r
446 ("_InvalidArgOfOper",
\r
447 [("ENG", "Invalid argument of operator")]);
\r
448 ("_UnsupportedDerOperArg",
\r
449 [("ENG", "Unsupported \"der\" operator argument")]);
\r
450 ("_InvalidInteger",
\r
451 [("ENG", "Invalid Integer representation")]);
\r
452 ("_NonSupportedTypeOfFuncInOut",
\r
453 [("ENG", "Non supported type of function input or output")]);
\r
454 ("_DuplicateDeclarationOfElement",
\r
455 [("ENG", "Duplicate declaration of element")]) (* to be documented *)
\r
458 let translate msg =
\r
460 List.assoc "ENG" (List.assoc msg msgs)
\r