modelicalang.v3_5 module
- class modelicalang.v3_5.Syntax(*args, **kwargs)
Bases:
object
- static ALGORITHM() arpeggio.RegExMatch
ALGORITHM = algorithm
- static AND() arpeggio.RegExMatch
AND = and
- static ANNOTATION() arpeggio.RegExMatch
ANNOTATION = annotation
- static BLOCK() arpeggio.RegExMatch
BLOCK = block
- static BREAK() arpeggio.RegExMatch
BREAK = break
- static CLASS() arpeggio.RegExMatch
CLASS = class
- static CONNECT() arpeggio.RegExMatch
CONNECT = connect
- static CONNECTOR() arpeggio.RegExMatch
CONNECTOR = connector
- static CONSTANT() arpeggio.RegExMatch
CONSTANT = constant
- static CONSTRAINEDBY() arpeggio.RegExMatch
CONSTRAINEDBY = constrainedby
- static DER() arpeggio.RegExMatch
DER = der
- static DISCRETE() arpeggio.RegExMatch
DISCRETE = discrete
- static EACH() arpeggio.RegExMatch
EACH = each
- static ELSE() arpeggio.RegExMatch
ELSE = else
- static ELSEIF() arpeggio.RegExMatch
ELSEIF = elseif
- static ELSEWHEN() arpeggio.RegExMatch
ELSEWHEN = elsewhen
- static ENCAPSULATED() arpeggio.RegExMatch
ENCAPSULATED = encapsulated
- static END() arpeggio.RegExMatch
END = end
- static ENUMERATION() arpeggio.RegExMatch
ENUMERATION = enumeration
- static EQUATION() arpeggio.RegExMatch
EQUATION = equation
- static EXPANDABLE() arpeggio.RegExMatch
EXPANDABLE = expandable
- static EXTENDS() arpeggio.RegExMatch
EXTENDS = extends
- static EXTERNAL() arpeggio.RegExMatch
EXTERNAL = external
- static FALSE() arpeggio.RegExMatch
FALSE = false
- static FINAL() arpeggio.RegExMatch
FINAL = final
- static FLOW() arpeggio.RegExMatch
FLOW = flow
- static FOR() arpeggio.RegExMatch
FOR = for
- static FUNCTION() arpeggio.RegExMatch
FUNCTION = function
- static IF() arpeggio.RegExMatch
IF = if
- static IMPORT() arpeggio.RegExMatch
IMPORT = import
- static IMPURE() arpeggio.RegExMatch
IMPURE = impure
- static IN() arpeggio.RegExMatch
IN = in
- static INITIAL() arpeggio.RegExMatch
INITIAL = initial
- static INNER() arpeggio.RegExMatch
INNER = inner
- static INPUT() arpeggio.RegExMatch
INPUT = input
- static LOOP() arpeggio.RegExMatch
LOOP = loop
- static MODEL() arpeggio.RegExMatch
MODEL = model
- static NOT() arpeggio.RegExMatch
NOT = not
- static OPERATOR() arpeggio.RegExMatch
OPERATOR = operator
- static OR() arpeggio.RegExMatch
OR = or
- static OUTER() arpeggio.RegExMatch
OUTER = outer
- static OUTPUT() arpeggio.RegExMatch
OUTPUT = output
- static PACKAGE() arpeggio.RegExMatch
PACKAGE = package
- static PARAMETER() arpeggio.RegExMatch
PARAMETER = parameter
- static PARTIAL() arpeggio.RegExMatch
PARTIAL = partial
- static PROTECTED() arpeggio.RegExMatch
PROTECTED = protected
- static PUBLIC() arpeggio.RegExMatch
PUBLIC = public
- static PURE() arpeggio.RegExMatch
PURE = pure
- static RECORD() arpeggio.RegExMatch
RECORD = record
- static REDECLARE() arpeggio.RegExMatch
REDECLARE = redeclare
- static REPLACEABLE() arpeggio.RegExMatch
REPLACEABLE = replaceable
- static RETURN() arpeggio.RegExMatch
RETURN = return
- static STREAM() arpeggio.RegExMatch
STREAM = stream
- static THEN() arpeggio.RegExMatch
THEN = then
- static TRUE() arpeggio.RegExMatch
TRUE = true
- static TYPE() arpeggio.RegExMatch
TYPE = type
- static WHEN() arpeggio.RegExMatch
WHEN = when
- static WHILE() arpeggio.RegExMatch
WHILE = while
- static WITHIN() arpeggio.RegExMatch
WITHIN = within
- classmethod IDENT() arpeggio.RegExMatch
IDENT = NONDIGIT { DIGIT | NONDIGIT } | Q-IDENT
- classmethod Q_IDENT() arpeggio.RegExMatch
Q-IDENT = "'" { Q-CHAR | S-ESCAPE } "'"
- classmethod NONDIGIT() arpeggio.RegExMatch
NONDIGIT = "_" | r'[a-z]' | r'[A-Z]'
- classmethod STRING() arpeggio.RegExMatch
STRING = """ { S-CHAR | S-ESCAPE } """
- classmethod S_CHAR() arpeggio.RegExMatch
S-CHAR = // S-CHAR is any member of the Unicode character set // (http://www.unicode.org; see section 13.4 for storing as UTF-8 on files) // except double-quote ‘”’, and backslash ‘\’. r'[^"\\]'
- classmethod Q_CHAR() arpeggio.RegExMatch
Q-CHAR = NONDIGIT | DIGIT | "!" | "#" | "$" | "%" | "&" | "(" | ")" | "*" | "+" | "," | "-" | "." | "/" | ":" | ";" | "<" | ">" | "=" | "?" | "@" | "[" | "]" | "^" | "{" | "}" | "|" | "~" | " " | """
- classmethod S_ESCAPE() arpeggio.RegExMatch
S-ESCAPE = "\'" | "\"" | "\?" | "\\" | "\a" | "\b" | "\f" | "\n" | "\r" | "\t" | "\v"
- classmethod DIGIT() arpeggio.RegExMatch
DIGIT = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
- classmethod UNSIGNED_INTEGER() arpeggio.RegExMatch
UNSIGNED-INTEGER = DIGIT { DIGIT }
- classmethod UNSIGNED_REAL() arpeggio.RegExMatch
UNSIGNED-REAL = UNSIGNED_INTEGER [ "." [ UNSIGNED_INTEGER ] ] ( "e" | "E" ) [ "+" | "-" ] UNSIGNED-INTEGER | UNSIGNED-INTEGER "." [ UNSIGNED-INTEGER ] | "." UNSIGNED-INTEGER [ ( "e" | "E" ) [ "+" | "-" ] UNSIGNED-INTEGER ]
- classmethod COMMENT() arpeggio.RegExMatch
COMMENT = // line comment r'//.*' /* multi-line comment */ | r'/\*([^*]|\*(?!/))*\*/'
- classmethod stored_definition() ...
stored-definition : [ within [ name ] ";" ] { [ final ] class-definition ";" }
- classmethod class_definition() ...
class-definition : [ encapsulated ] class-prefixes class-specifier
- classmethod class_prefixes() ...
class-prefixes : [ partial ] ( class | model | [ operator ] record | block | [ expandable ] connector | type | package | [ pure | impure ] [ operator ] function | operator )
- classmethod class_specifier() ...
class-specifier : long-class-specifier | short-class-specifier | der-class-specifier
- classmethod long_class_specifier() ...
long-class-specifier : IDENT description-string composition end IDENT | extends IDENT [ class-modification ] description-string composition end IDENT
- classmethod short_class_specifier() ...
short-class-specifier : IDENT "=" base-prefix type-specifier [ array-subscripts ] [ class-modification ] description | IDENT "=" enumeration "(" ( [ enum-list ] | ":" ) ")" description
- classmethod der_class_specifier() ...
der-class-specifier : IDENT "=" der "(" type-specifier "," IDENT { "," IDENT } ")" description
- classmethod base_prefix() ...
base-prefix : [ input | output ]
- classmethod enum_list() ...
enum-list : enumeration-literal { "," enumeration-literal }
- classmethod enumeration_literal() ...
enumeration-literal : IDENT description
- classmethod composition() ...
composition : element-list { public element-list | protected element-list | equation-section | algorithm-section } [ external [ language-specification ] [ external-function-call ] [ annotation-clause ] ";" ] [ annotation-clause ";" ]
- classmethod language_specification() ...
language-specification : STRING
- classmethod external_function_call() ...
external-function-call : [ component-reference "=" ] IDENT "(" [ expression-list ] ")"
- classmethod element_list() ...
element-list : { element ";" }
- classmethod element() ...
element : import-clause | extends-clause | [ redeclare ] [ final ] [ inner ] [ outer ] ( class-definition | component-clause | replaceable ( class-definition | component-clause ) [ constraining-clause description ] )
- classmethod import_clause() ...
import-clause : import ( IDENT "=" name | name [ ".*" | "." ( "*" | "{" import-list "}" ) ] ) description
- classmethod import_list() ...
import-list : IDENT { "," IDENT }
- classmethod extends_clause() ...
extends-clause : extends type-specifier [ class-modification ] [ annotation-clause ]
- classmethod constraining_clause() ...
constraining-clause : constrainedby type-specifier [ class-modification ]
- classmethod component_clause() ...
component-clause : type-prefix type-specifier [ array-subscripts ] component-list
- classmethod type_prefix() ...
type-prefix : [ flow | stream ] [ discrete | parameter | constant ] [ input | output ]
- classmethod component_list() ...
component-list : component-declaration { "," component-declaration }
- classmethod component_declaration() ...
component-declaration : declaration [ condition-attribute ] description
- classmethod condition_attribute() ...
condition-attribute : if expression
- classmethod declaration() ...
declaration : IDENT [ array-subscripts ] [ modification ]
- classmethod modification() ...
modification : class-modification [ "=" expression ] | "=" expression | ":=" expression
- classmethod class_modification() ...
class-modification : "(" [ argument-list ] ")"
- classmethod argument_list() ...
argument-list : argument { "," argument }
- classmethod argument() ...
argument : element-modification-or-replaceable | element-redeclaration
- classmethod element_modification_or_replaceable() ...
element-modification-or-replaceable : [ each ] [ final ] ( element-modification | element-replaceable )
- classmethod element_modification() ...
element-modification : name [ modification ] description-string
- classmethod element_redeclaration() ...
element-redeclaration : redeclare [ each ] [ final ] ( short-class-definition | component-clause1 | element-replaceable )
- classmethod element_replaceable() ...
element-replaceable : replaceable ( short-class-definition | component-clause1 ) [ constraining-clause ]
- classmethod component_clause1() ...
component-clause1 : type-prefix type-specifier component-declaration1
- classmethod component_declaration1() ...
component-declaration1 : declaration description
- classmethod short_class_definition() ...
short-class-definition : class-prefixes short-class-specifier
- classmethod equation_section() ...
equation-section : [ initial ] equation { equation ";" }
- classmethod algorithm_section() ...
algorithm-section : [ initial ] algorithm { statement ";" }
- classmethod equation() ...
equation : ( simple-expression "=" expression | if-equation | for-equation | connect-clause | when-equation | component-reference function-call-args ) description
- classmethod statement() ...
statement : ( component-reference ( ":=" expression | function-call-args ) | "(" output-expression-list ")" ":=" component-reference function-call-args | break | return | if-statement | for-statement | while-statement | when-statement ) description
- classmethod if_equation() ...
if-equation : if expression then { equation ";" } { elseif expression then { equation ";" } } [ else { equation ";" } ] end if
- classmethod if_statement() ...
if-statement : if expression then { statement ";" } { elseif expression then { statement ";" } } [ else { statement ";" } ] end if
- classmethod for_equation() ...
for-equation : for for-indices loop { equation ";" } end for
- classmethod for_statement() ...
for-statement : for for-indices loop { statement ";" } end for
- classmethod for_indices() ...
for-indices : for-index { "," for-index }
- classmethod for_index() ...
for-index : IDENT [ in expression ]
- classmethod while_statement() ...
while-statement : while expression loop { statement ";" } end while
- classmethod when_equation() ...
when-equation : when expression then { equation ";" } { elsewhen expression then { equation ";" } } end when
- classmethod when_statement() ...
when-statement : when expression then { statement ";" } { elsewhen expression then { statement ";" } } end when
- classmethod connect_clause() ...
connect-clause : connect "(" component-reference "," component-reference ")"
- classmethod expression() ...
expression : simple-expression | if expression then expression { elseif expression then expression } else expression
- classmethod simple_expression() ...
simple-expression : logical-expression [ ":" logical-expression [ ":" logical-expression ] ]
- classmethod logical_expression() ...
logical-expression : logical-term { or logical-term }
- classmethod logical_term() ...
logical-term : logical-factor { and logical-factor }
- classmethod logical_factor() ...
logical-factor : [ not ] relation
- classmethod relation() ...
relation : arithmetic-expression [ relational-operator arithmetic-expression ]
- classmethod relational_operator() ...
relational-operator : /* 2-characters */ "==" | "<>" | "<=" | ">=" | /* 1-character */ "<" | ">"
- classmethod arithmetic_expression() ...
arithmetic-expression : [ add-operator ] term { add-operator term }
- classmethod add_operator() ...
add-operator : "+" | "-" | ".+" | ".-"
- classmethod term() ...
term : factor { mul-operator factor }
- classmethod mul_operator() ...
mul-operator : "*" | "/" | ".*" | "./"
- classmethod factor() ...
factor : primary [ ("^" | ".^") primary ]
- classmethod primary() ...
primary : UNSIGNED-NUMBER | STRING | false | true | ( component-reference | der | initial | pure ) function-call-args | component-reference | "(" output-expression-list ")" | "[" expression-list { ";" expression-list } "]" | "{" array-arguments "}" | end
- classmethod UNSIGNED_NUMBER() arpeggio.RegExMatch
UNSIGNED-NUMBER = UNSIGNED-REAL | UNSIGNED-INTEGER
- classmethod type_specifier() ...
type-specifier : ["."] name
- classmethod name() ...
name : IDENT { "." IDENT }
- classmethod component_reference() ...
component-reference : [ "." ] IDENT [ array-subscripts ] { "." IDENT [ array-subscripts ] }
- classmethod function_call_args() ...
function-call-args : "(" [ function-arguments ] ")"
- classmethod function_arguments() ...
function-arguments : function-partial-application [ "," function-arguments-non-first ] | named-arguments | expression [ "," function-arguments-non-first | for for-indices ]
- classmethod function_arguments_non_first() ...
function-arguments-non-first : named-arguments | function-argument [ "," function-arguments-non-first ]
- classmethod array_arguments() ...
array-arguments : expression [ "," array-arguments-non-first | for for-indices ]
- classmethod array_arguments_non_first() ...
array-arguments-non-first : expression [ "," array-arguments-non-first ]
- classmethod named_arguments() ...
named-arguments: named-argument [ "," named-arguments ]
- classmethod named_argument() ...
named-argument: IDENT "=" function-argument
- classmethod function_argument() ...
function-argument : function-partial-application | expression
- classmethod function_partial_application() ...
function-partial-application : function type-specifier "(" [ named-arguments ] ")"
- classmethod output_expression_list() ...
output-expression-list : [ expression ] { "," [ expression ] }
- classmethod expression_list() ...
expression-list : expression { "," expression }
- classmethod array_subscripts() ...
array-subscripts : "[" subscript { "," subscript } "]"
- classmethod subscript() ...
subscript : ":" | expression
- classmethod description() ...
description : description-string [ annotation-clause ]
- classmethod description_string() ...
description-string : [ STRING { "+" STRING } ]
- classmethod annotation_clause() ...
annotation-clause : annotation class-modification