pyfcstm 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. pyfcstm/__init__.py +0 -0
  2. pyfcstm/__main__.py +4 -0
  3. pyfcstm/config/__init__.py +0 -0
  4. pyfcstm/config/meta.py +20 -0
  5. pyfcstm/dsl/__init__.py +6 -0
  6. pyfcstm/dsl/error.py +226 -0
  7. pyfcstm/dsl/grammar/Grammar.g4 +190 -0
  8. pyfcstm/dsl/grammar/Grammar.interp +168 -0
  9. pyfcstm/dsl/grammar/Grammar.tokens +118 -0
  10. pyfcstm/dsl/grammar/GrammarLexer.interp +214 -0
  11. pyfcstm/dsl/grammar/GrammarLexer.py +523 -0
  12. pyfcstm/dsl/grammar/GrammarLexer.tokens +118 -0
  13. pyfcstm/dsl/grammar/GrammarListener.py +521 -0
  14. pyfcstm/dsl/grammar/GrammarParser.py +4373 -0
  15. pyfcstm/dsl/grammar/__init__.py +3 -0
  16. pyfcstm/dsl/listener.py +440 -0
  17. pyfcstm/dsl/node.py +1581 -0
  18. pyfcstm/dsl/parse.py +155 -0
  19. pyfcstm/entry/__init__.py +1 -0
  20. pyfcstm/entry/base.py +126 -0
  21. pyfcstm/entry/cli.py +12 -0
  22. pyfcstm/entry/dispatch.py +46 -0
  23. pyfcstm/entry/generate.py +83 -0
  24. pyfcstm/entry/plantuml.py +67 -0
  25. pyfcstm/model/__init__.py +3 -0
  26. pyfcstm/model/base.py +51 -0
  27. pyfcstm/model/expr.py +764 -0
  28. pyfcstm/model/model.py +1392 -0
  29. pyfcstm/render/__init__.py +3 -0
  30. pyfcstm/render/env.py +36 -0
  31. pyfcstm/render/expr.py +180 -0
  32. pyfcstm/render/func.py +77 -0
  33. pyfcstm/render/render.py +279 -0
  34. pyfcstm/utils/__init__.py +6 -0
  35. pyfcstm/utils/binary.py +38 -0
  36. pyfcstm/utils/doc.py +64 -0
  37. pyfcstm/utils/jinja2.py +121 -0
  38. pyfcstm/utils/json.py +125 -0
  39. pyfcstm/utils/text.py +91 -0
  40. pyfcstm/utils/validate.py +102 -0
  41. pyfcstm-0.0.1.dist-info/LICENSE +165 -0
  42. pyfcstm-0.0.1.dist-info/METADATA +205 -0
  43. pyfcstm-0.0.1.dist-info/RECORD +46 -0
  44. pyfcstm-0.0.1.dist-info/WHEEL +5 -0
  45. pyfcstm-0.0.1.dist-info/entry_points.txt +2 -0
  46. pyfcstm-0.0.1.dist-info/top_level.txt +1 -0
pyfcstm/__init__.py ADDED
File without changes
pyfcstm/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from .entry import pyfcstmcli
2
+
3
+ if __name__ == '__main__':
4
+ pyfcstmcli()
File without changes
pyfcstm/config/meta.py ADDED
@@ -0,0 +1,20 @@
1
+ """
2
+ Overview:
3
+ Meta information for pyfcstm package.
4
+ """
5
+
6
+ #: Title of this project (should be `pyfcstm`).
7
+ __TITLE__ = 'pyfcstm'
8
+
9
+ #: Version of this project.
10
+ __VERSION__ = '0.0.1'
11
+
12
+ #: Short description of the project, will be included in ``setup.py``.
13
+ __DESCRIPTION__ = ('A Python framework for parsing finite state machine DSL and '
14
+ 'generating executable code in multiple target languages.')
15
+
16
+ #: Author of this project.
17
+ __AUTHOR__ = 'HansBug'
18
+
19
+ #: Email of the authors'.
20
+ __AUTHOR_EMAIL__ = 'hansbug@buaa.edu.cn'
@@ -0,0 +1,6 @@
1
+ from .error import CollectingErrorListener, GrammarItemError, GrammarParseError, SyntaxFailError, AmbiguityError, \
2
+ FullContextAttemptError, ContextSensitivityError
3
+ from .grammar import *
4
+ from .listener import GrammarParseListener
5
+ from .node import *
6
+ from .parse import parse_condition, parse_preamble, parse_operation, parse_with_grammar_entry
pyfcstm/dsl/error.py ADDED
@@ -0,0 +1,226 @@
1
+ """
2
+ ANTLR Error Collection and Handling Module
3
+
4
+ This module provides functionality for collecting and handling errors during ANTLR parsing processes.
5
+ It implements a custom error listener that accumulates errors instead of throwing them immediately,
6
+ allowing for comprehensive error reporting after the parsing is complete.
7
+ """
8
+
9
+ import os
10
+ from typing import List
11
+
12
+ from antlr4 import CommonTokenStream, Token
13
+ from antlr4.error.ErrorListener import ErrorListener
14
+
15
+
16
+ class GrammarItemError(Exception):
17
+ """
18
+ Base class for all grammar-related errors.
19
+
20
+ This class serves as the parent class for specific grammar error types,
21
+ providing a common interface for error handling in the grammar parsing system.
22
+ """
23
+ pass
24
+
25
+
26
+ class SyntaxFailError(GrammarItemError):
27
+ """
28
+ Error raised when a syntax error is encountered during parsing.
29
+
30
+ :param line: The line number where the error occurred
31
+ :type line: int
32
+ :param column: The column number where the error occurred
33
+ :type column: int
34
+ :param offending_symbol_text: The text of the problematic symbol
35
+ :type offending_symbol_text: str
36
+ :param msg: The error message
37
+ :type msg: str
38
+ """
39
+
40
+ def __init__(self, line, column, offending_symbol_text, msg):
41
+ self.line = line
42
+ self.column = column
43
+ self.offending_symbol_text = offending_symbol_text
44
+ self.msg = msg
45
+ ctx_info = f", near '{offending_symbol_text}'" if offending_symbol_text else ""
46
+ error_msg = f"Syntax error at line {line}, column {column}{ctx_info}: {msg}"
47
+ super().__init__(error_msg)
48
+
49
+
50
+ class AmbiguityError(GrammarItemError):
51
+ """
52
+ Error raised when grammar ambiguity is detected.
53
+
54
+ :param input_range: The range of input text where ambiguity was detected
55
+ :type input_range: str
56
+ :param start_index: The starting index of the ambiguous section
57
+ :type start_index: int
58
+ :param stop_index: The ending index of the ambiguous section
59
+ :type stop_index: int
60
+ """
61
+
62
+ def __init__(self, input_range, start_index, stop_index):
63
+ self.input_range = input_range
64
+ self.start_index = start_index
65
+ self.stop_index = stop_index
66
+ error_msg = f"Grammar ambiguity at input '{input_range}' (from index {start_index} to {stop_index})."
67
+ super().__init__(error_msg)
68
+
69
+
70
+ class FullContextAttemptError(GrammarItemError):
71
+ """
72
+ Error raised when the parser attempts full context interpretation.
73
+
74
+ :param input_range: The range of input text where full context attempt occurred
75
+ :type input_range: str
76
+ :param start_index: The starting index of the affected section
77
+ :type start_index: int
78
+ :param stop_index: The ending index of the affected section
79
+ :type stop_index: int
80
+ """
81
+
82
+ def __init__(self, input_range, start_index, stop_index):
83
+ self.input_range = input_range
84
+ self.start_index = start_index
85
+ self.stop_index = stop_index
86
+ error_msg = (f"Parser attempting full context interpretation at input '{input_range}' "
87
+ f"(from index {start_index} to {stop_index}).")
88
+ super().__init__(error_msg)
89
+
90
+
91
+ class ContextSensitivityError(GrammarItemError):
92
+ """
93
+ Error raised when context sensitivity is detected.
94
+
95
+ :param input_range: The range of input text where context sensitivity was detected
96
+ :type input_range: str
97
+ :param start_index: The starting index of the sensitive section
98
+ :type start_index: int
99
+ :param stop_index: The ending index of the sensitive section
100
+ :type stop_index: int
101
+ """
102
+
103
+ def __init__(self, input_range, start_index, stop_index):
104
+ self.input_range = input_range
105
+ self.start_index = start_index
106
+ self.stop_index = stop_index
107
+ error_msg = f"Context sensitivity at input '{input_range}' (from index {start_index} to {stop_index})."
108
+ super().__init__(error_msg)
109
+
110
+
111
+ class UnfinishedParsingError(GrammarItemError):
112
+ def __init__(self, lineno):
113
+ self.lineno = lineno
114
+ error_msg = f"Failed to completely parse input text, unparsed content at position {self.lineno}"
115
+ super().__init__(error_msg)
116
+
117
+
118
+ class GrammarParseError(Exception):
119
+ """
120
+ Exception raised when one or more grammar parsing errors are encountered.
121
+
122
+ :param errors: List of grammar-related errors that occurred during parsing
123
+ :type errors: List[GrammarItemError]
124
+ """
125
+
126
+ def __init__(self, errors: List[GrammarItemError]):
127
+ self.errors = errors
128
+ error_report = os.linesep.join([f"Error {i + 1}: {error}" for i, error in enumerate(self.errors)])
129
+ error_message = f"Found {len(self.errors)} errors during parsing:{os.linesep}{error_report}"
130
+ super().__init__(error_message)
131
+
132
+
133
+ class CollectingErrorListener(ErrorListener):
134
+ """
135
+ A custom ANTLR error listener that collects errors during parsing.
136
+
137
+ This class extends ANTLR's ErrorListener to provide comprehensive error collection
138
+ and reporting functionality. Instead of immediately throwing exceptions, it
139
+ accumulates errors and can report them collectively.
140
+
141
+ :ivar errors: List storing all encountered error messages
142
+ :type errors: list[GrammarItemError]
143
+ """
144
+
145
+ def __init__(self):
146
+ """
147
+ Initialize the error listener with an empty error collection.
148
+ """
149
+ super().__init__()
150
+ self.errors: List[GrammarItemError] = []
151
+
152
+ def syntaxError(self, recognizer, offendingSymbol, line, column, msg, e):
153
+ """
154
+ Handle and collect syntax errors encountered during parsing.
155
+
156
+ :param recognizer: The parser that encountered the error
157
+ :param offendingSymbol: The problematic input symbol
158
+ :param line: Line number where the error occurred
159
+ :param column: Column number where the error occurred
160
+ :param msg: The error message
161
+ :param e: The exception that was raised
162
+ """
163
+ offending_text = offendingSymbol.text if offendingSymbol else None
164
+ self.errors.append(SyntaxFailError(line, column, offending_text, msg))
165
+
166
+ def reportAmbiguity(self, recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs):
167
+ """
168
+ Handle and collect grammar ambiguity issues.
169
+
170
+ :param recognizer: The parser that encountered the ambiguity
171
+ :param dfa: The DFA being processed
172
+ :param startIndex: Starting index of the ambiguous input
173
+ :param stopIndex: Ending index of the ambiguous input
174
+ :param exact: Whether the ambiguity is exact
175
+ :param ambigAlts: The ambiguous alternatives
176
+ :param configs: The ATN configurations
177
+ """
178
+ tokens = recognizer.getTokenStream()
179
+ input_range = tokens.getText(startIndex, stopIndex)
180
+ self.errors.append(AmbiguityError(input_range, startIndex, stopIndex))
181
+
182
+ def reportAttemptingFullContext(self, recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs):
183
+ """
184
+ Handle and collect full context parsing attempts.
185
+
186
+ :param recognizer: The parser attempting full context
187
+ :param dfa: The DFA being processed
188
+ :param startIndex: Starting index of the affected input
189
+ :param stopIndex: Ending index of the affected input
190
+ :param conflictingAlts: The conflicting alternatives
191
+ :param configs: The ATN configurations
192
+ """
193
+ tokens = recognizer.getTokenStream()
194
+ input_range = tokens.getText(startIndex, stopIndex)
195
+ self.errors.append(FullContextAttemptError(input_range, startIndex, stopIndex))
196
+
197
+ def reportContextSensitivity(self, recognizer, dfa, startIndex, stopIndex, prediction, configs):
198
+ """
199
+ Handle and collect context sensitivity issues.
200
+
201
+ :param recognizer: The parser that encountered the sensitivity
202
+ :param dfa: The DFA being processed
203
+ :param startIndex: Starting index of the sensitive input
204
+ :param stopIndex: Ending index of the sensitive input
205
+ :param prediction: The predicted alternative
206
+ :param configs: The ATN configurations
207
+ """
208
+ tokens = recognizer.getTokenStream()
209
+ input_range = tokens.getText(startIndex, stopIndex)
210
+ self.errors.append(ContextSensitivityError(input_range, startIndex, stopIndex))
211
+
212
+ def check_unfinished_parsing_error(self, stream: CommonTokenStream):
213
+ if stream.LA(1) != Token.EOF:
214
+ self.errors.append(UnfinishedParsingError(lineno=stream.get(stream.index).line))
215
+
216
+ def check_errors(self):
217
+ """
218
+ Check for collected errors and raise an exception if any exist.
219
+
220
+ This method should be called after parsing is complete to verify if any
221
+ errors were encountered during the process.
222
+
223
+ :raises GrammarParseError: If any errors were collected during parsing, with detailed error messages
224
+ """
225
+ if self.errors:
226
+ raise GrammarParseError(self.errors)
@@ -0,0 +1,190 @@
1
+ // Grammar.g4
2
+ grammar Grammar;
3
+
4
+ // program: statement+;
5
+
6
+ // for guard condition
7
+ condition: cond_expression EOF;
8
+
9
+ state_machine_dsl: def_assignment* state_definition EOF;
10
+
11
+ def_assignment: 'def' deftype=('int'|'float') ID '=' init_expression ';';
12
+
13
+ state_definition
14
+ : 'state' state_id=ID ';' # leafStateDefinition
15
+ | 'state' state_id=ID '{' state_inner_statement* '}' # compositeStateDefinition
16
+ ;
17
+
18
+ transition_definition
19
+ : '[*]' '->' to_state=ID (|(':'|'::') chain_id|':' 'if' '[' cond_expression ']') (';'|'effect' '{' operational_statement* '}') # entryTransitionDefinition
20
+ | from_state=ID '->' to_state=ID (|'::' from_id=ID|':' chain_id|':' 'if' '[' cond_expression ']') (';'|'effect' '{' operational_statement* '}') # normalTransitionDefinition
21
+ | from_state=ID '->' '[*]' (|'::' from_id=ID|':' chain_id|':' 'if' '[' cond_expression ']') (';'|'effect' '{' operational_statement* '}') # exitTransitionDefinition
22
+ ;
23
+
24
+ transition_force_definition
25
+ : '!' from_state=ID '->' to_state=ID (|'::' from_id=ID|':' chain_id|':' 'if' '[' cond_expression ']') ';' # normalForceTransitionDefinition
26
+ | '!' from_state=ID '->' '[*]' (|'::' from_id=ID|':' chain_id|':' 'if' '[' cond_expression ']') ';' # exitForceTransitionDefinition
27
+ | '!' '*' '->' to_state=ID (|('::'|':') chain_id|':' 'if' '[' cond_expression ']') ';' # normalAllForceTransitionDefinition
28
+ | '!' '*' '->' '[*]' (|('::'|':') chain_id|':' 'if' '[' cond_expression ']') ';' # exitAllForceTransitionDefinition
29
+ ;
30
+
31
+ enter_definition
32
+ : 'enter' (func_name=ID)? '{' operational_statement* '}' # enterOperations
33
+ | 'enter' 'abstract' func_name=ID ';' # enterAbstractFunc
34
+ | 'enter' 'abstract' (func_name=ID)? raw_doc=MULTILINE_COMMENT # enterAbstractFunc
35
+ ;
36
+
37
+ exit_definition
38
+ : 'exit' (func_name=ID)? '{' operational_statement* '}' # exitOperations
39
+ | 'exit' 'abstract' func_name=ID ';' # exitAbstractFunc
40
+ | 'exit' 'abstract' (func_name=ID)? raw_doc=MULTILINE_COMMENT # exitAbstractFunc
41
+ ;
42
+
43
+ during_definition
44
+ : 'during' aspect=('before'|'after')? (func_name=ID)? '{' operational_statement* '}' # duringOperations
45
+ | 'during' aspect=('before'|'after')? 'abstract' func_name=ID ';' # duringAbstractFunc
46
+ | 'during' aspect=('before'|'after')? 'abstract' (func_name=ID)? raw_doc=MULTILINE_COMMENT # duringAbstractFunc
47
+ ;
48
+
49
+ during_aspect_definition
50
+ : '>>' 'during' aspect=('before'|'after') (func_name=ID)? '{' operational_statement* '}' # duringAspectOperations
51
+ | '>>' 'during' aspect=('before'|'after') 'abstract' func_name=ID ';' # duringAspectAbstractFunc
52
+ | '>>' 'during' aspect=('before'|'after') 'abstract' (func_name=ID)? raw_doc=MULTILINE_COMMENT # duringAspectAbstractFunc
53
+ ;
54
+
55
+ operation_assignment: ID '=' num_expression ';';
56
+
57
+ operational_statement
58
+ : operation_assignment
59
+ | ';'
60
+ ;
61
+
62
+ state_inner_statement
63
+ : state_definition
64
+ | transition_definition
65
+ | transition_force_definition
66
+ | enter_definition
67
+ | during_definition
68
+ | exit_definition
69
+ | during_aspect_definition
70
+ | ';'
71
+ ;
72
+
73
+ // basic configs for the previous design
74
+ // for on_xxx operations
75
+ operation_program: operational_assignment* EOF;
76
+
77
+ // for preamable initialization
78
+ preamble_program: preamble_statement* EOF;
79
+ preamble_statement
80
+ : initial_assignment
81
+ | constant_definition
82
+ ;
83
+
84
+ initial_assignment: ID ':=' init_expression ';';
85
+ constant_definition: ID '=' init_expression ';';
86
+ operational_assignment: ID ':=' num_expression ';';
87
+
88
+ generic_expression
89
+ : num_expression
90
+ | cond_expression
91
+ ;
92
+
93
+ init_expression
94
+ : '(' init_expression ')' # parenExprInit
95
+ | num_literal # literalExprInit
96
+ | math_const # mathConstExprInit
97
+ | op=('+'|'-') init_expression # unaryExprInit
98
+ | <assoc=right> init_expression op='**' init_expression # binaryExprInit
99
+ | init_expression op=('*'|'/'|'%') init_expression # binaryExprInit
100
+ | init_expression op=('+'|'-') init_expression # binaryExprInit
101
+ | init_expression op=('<<'|'>>') init_expression # binaryExprInit
102
+ | init_expression op='&' init_expression # binaryExprInit
103
+ | init_expression op='^' init_expression # binaryExprInit
104
+ | init_expression op='|' init_expression # binaryExprInit
105
+ | function=UFUNC_NAME '(' init_expression ')' # funcExprInit
106
+ ;
107
+
108
+ num_expression
109
+ : '(' num_expression ')' # parenExprNum
110
+ | num_literal # literalExprNum
111
+ | ID # idExprNum
112
+ | math_const # mathConstExprNum
113
+ | op=('+'|'-') num_expression # unaryExprNum
114
+ | <assoc=right> num_expression op='**' num_expression # binaryExprNum
115
+ | num_expression op=('*'|'/'|'%') num_expression # binaryExprNum
116
+ | num_expression op=('+'|'-') num_expression # binaryExprNum
117
+ | num_expression op=('<<'|'>>') num_expression # binaryExprNum
118
+ | num_expression op='&' num_expression # binaryExprNum
119
+ | num_expression op='^' num_expression # binaryExprNum
120
+ | num_expression op='|' num_expression # binaryExprNum
121
+ | function=UFUNC_NAME '(' num_expression ')' # funcExprNum
122
+ | <assoc=right> '(' cond_expression ')' '?' num_expression ':' num_expression # conditionalCStyleExprNum
123
+ ;
124
+
125
+ cond_expression
126
+ : '(' cond_expression ')' # parenExprCond
127
+ | bool_literal # literalExprCond
128
+ | op=('!'|'not') cond_expression # unaryExprCond
129
+ | num_expression op=('<'|'>'|'<='|'>=') num_expression # binaryExprFromNumCond
130
+ | num_expression op=('=='|'!=') num_expression # binaryExprFromNumCond
131
+ | cond_expression op=('=='|'!=') cond_expression # binaryExprFromCondCond
132
+ | cond_expression op=('&&'|'and') cond_expression # binaryExprCond
133
+ | cond_expression op=('||'|'or') cond_expression # binaryExprCond
134
+ | <assoc=right> '(' cond_expression ')' '?' cond_expression ':' cond_expression # conditionalCStyleCondNum
135
+ ;
136
+
137
+ num_literal
138
+ : INT
139
+ | FLOAT
140
+ | HEX_INT
141
+ ;
142
+
143
+ bool_literal
144
+ : TRUE
145
+ | FALSE
146
+ ;
147
+
148
+ math_const: 'pi' | 'E' | 'tau';
149
+
150
+ chain_id: isabs='/'? ID ('.' ID)*;
151
+
152
+ FLOAT: [0-9]+'.'[0-9]* ([eE][+-]?[0-9]+)?
153
+ | '.'[0-9]+ ([eE][+-]?[0-9]+)?
154
+ | [0-9]+ [eE][+-]?[0-9]+;
155
+ INT: [0-9]+;
156
+ HEX_INT: '0x' HexDigit+;
157
+
158
+ TRUE: 'True' | 'true' | 'TRUE';
159
+ FALSE: 'False' | 'false' | 'FALSE';
160
+
161
+ UFUNC_NAME : 'sin' | 'cos' | 'tan' | 'asin' | 'acos' | 'atan'
162
+ | 'sinh' | 'cosh' | 'tanh' | 'asinh' | 'acosh' | 'atanh'
163
+ | 'sqrt' | 'cbrt' | 'exp' | 'log' | 'log10' | 'log2' | 'log1p'
164
+ | 'abs' | 'ceil' | 'floor' | 'round' | 'trunc'
165
+ | 'sign'
166
+ ;
167
+
168
+ ID: [a-zA-Z_][a-zA-Z0-9_]*;
169
+
170
+ STRING
171
+ : '"' (~["\\\r\n] | EscapeSequence)* '"'
172
+ | '\'' (~['\\\r\n] | EscapeSequence)* '\''
173
+ ;
174
+
175
+ fragment EscapeSequence
176
+ : '\\' [btnfr"'\\]
177
+ | '\\' ([0-3]? [0-7])? [0-7]
178
+ | '\\' 'u' HexDigit HexDigit HexDigit HexDigit
179
+ | '\\' 'x' HexDigit HexDigit
180
+ ;
181
+
182
+ fragment HexDigit
183
+ : [0-9a-fA-F]
184
+ ;
185
+
186
+ WS: [ \t\n\r]+ -> skip;
187
+ MULTILINE_COMMENT : '/*' .*? '*/';
188
+ // BLOCK_COMMENT: '/*' .*? '*/' -> skip;
189
+ LINE_COMMENT: '//' ~[\r\n]* -> skip;
190
+ PYTHON_COMMENT: '#' ~[\r\n]* -> skip;
@@ -0,0 +1,168 @@
1
+ token literal names:
2
+ null
3
+ 'def'
4
+ 'int'
5
+ 'float'
6
+ '='
7
+ ';'
8
+ 'state'
9
+ '{'
10
+ '}'
11
+ '[*]'
12
+ '->'
13
+ ':'
14
+ '::'
15
+ 'if'
16
+ '['
17
+ ']'
18
+ 'effect'
19
+ '!'
20
+ '*'
21
+ 'enter'
22
+ 'abstract'
23
+ 'exit'
24
+ 'during'
25
+ 'before'
26
+ 'after'
27
+ '>>'
28
+ ':='
29
+ '('
30
+ ')'
31
+ '+'
32
+ '-'
33
+ '**'
34
+ '/'
35
+ '%'
36
+ '<<'
37
+ '&'
38
+ '^'
39
+ '|'
40
+ '?'
41
+ 'not'
42
+ '<'
43
+ '>'
44
+ '<='
45
+ '>='
46
+ '=='
47
+ '!='
48
+ '&&'
49
+ 'and'
50
+ '||'
51
+ 'or'
52
+ 'pi'
53
+ 'E'
54
+ 'tau'
55
+ '.'
56
+ null
57
+ null
58
+ null
59
+ null
60
+ null
61
+ null
62
+ null
63
+ null
64
+ null
65
+ null
66
+ null
67
+ null
68
+
69
+ token symbolic names:
70
+ null
71
+ null
72
+ null
73
+ null
74
+ null
75
+ null
76
+ null
77
+ null
78
+ null
79
+ null
80
+ null
81
+ null
82
+ null
83
+ null
84
+ null
85
+ null
86
+ null
87
+ null
88
+ null
89
+ null
90
+ null
91
+ null
92
+ null
93
+ null
94
+ null
95
+ null
96
+ null
97
+ null
98
+ null
99
+ null
100
+ null
101
+ null
102
+ null
103
+ null
104
+ null
105
+ null
106
+ null
107
+ null
108
+ null
109
+ null
110
+ null
111
+ null
112
+ null
113
+ null
114
+ null
115
+ null
116
+ null
117
+ null
118
+ null
119
+ null
120
+ null
121
+ null
122
+ null
123
+ null
124
+ FLOAT
125
+ INT
126
+ HEX_INT
127
+ TRUE
128
+ FALSE
129
+ UFUNC_NAME
130
+ ID
131
+ STRING
132
+ WS
133
+ MULTILINE_COMMENT
134
+ LINE_COMMENT
135
+ PYTHON_COMMENT
136
+
137
+ rule names:
138
+ condition
139
+ state_machine_dsl
140
+ def_assignment
141
+ state_definition
142
+ transition_definition
143
+ transition_force_definition
144
+ enter_definition
145
+ exit_definition
146
+ during_definition
147
+ during_aspect_definition
148
+ operation_assignment
149
+ operational_statement
150
+ state_inner_statement
151
+ operation_program
152
+ preamble_program
153
+ preamble_statement
154
+ initial_assignment
155
+ constant_definition
156
+ operational_assignment
157
+ generic_expression
158
+ init_expression
159
+ num_expression
160
+ cond_expression
161
+ num_literal
162
+ bool_literal
163
+ math_const
164
+ chain_id
165
+
166
+
167
+ atn:
168
+ [3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 67, 564, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 3, 2, 3, 2, 3, 2, 3, 3, 7, 3, 61, 10, 3, 12, 3, 14, 3, 64, 11, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 7, 5, 83, 10, 5, 12, 5, 14, 5, 86, 11, 5, 3, 5, 5, 5, 89, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 103, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 109, 10, 6, 12, 6, 14, 6, 112, 11, 6, 3, 6, 5, 6, 115, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 131, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 137, 10, 6, 12, 6, 14, 6, 140, 11, 6, 3, 6, 5, 6, 143, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 159, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 165, 10, 6, 12, 6, 14, 6, 168, 11, 6, 3, 6, 5, 6, 171, 10, 6, 5, 6, 173, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 190, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 208, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 224, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 240, 10, 7, 3, 7, 5, 7, 243, 10, 7, 3, 8, 3, 8, 5, 8, 247, 10, 8, 3, 8, 3, 8, 7, 8, 251, 10, 8, 12, 8, 14, 8, 254, 11, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 264, 10, 8, 3, 8, 5, 8, 267, 10, 8, 3, 9, 3, 9, 5, 9, 271, 10, 9, 3, 9, 3, 9, 7, 9, 275, 10, 9, 12, 9, 14, 9, 278, 11, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 288, 10, 9, 3, 9, 5, 9, 291, 10, 9, 3, 10, 3, 10, 5, 10, 295, 10, 10, 3, 10, 5, 10, 298, 10, 10, 3, 10, 3, 10, 7, 10, 302, 10, 10, 12, 10, 14, 10, 305, 11, 10, 3, 10, 3, 10, 3, 10, 5, 10, 310, 10, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 317, 10, 10, 3, 10, 3, 10, 5, 10, 321, 10, 10, 3, 10, 5, 10, 324, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 330, 10, 11, 3, 11, 3, 11, 7, 11, 334, 10, 11, 12, 11, 14, 11, 337, 11, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 351, 10, 11, 3, 11, 5, 11, 354, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 5, 13, 363, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 373, 10, 14, 3, 15, 7, 15, 376, 10, 15, 12, 15, 14, 15, 379, 11, 15, 3, 15, 3, 15, 3, 16, 7, 16, 384, 10, 16, 12, 16, 14, 16, 387, 11, 16, 3, 16, 3, 16, 3, 17, 3, 17, 5, 17, 393, 10, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 5, 21, 412, 10, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 428, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 451, 10, 22, 12, 22, 14, 22, 454, 11, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 479, 10, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 7, 23, 502, 10, 23, 12, 23, 14, 23, 505, 11, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 531, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 542, 10, 24, 12, 24, 14, 24, 545, 11, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 5, 28, 554, 10, 28, 3, 28, 3, 28, 3, 28, 7, 28, 559, 10, 28, 12, 28, 14, 28, 562, 11, 28, 3, 28, 2, 5, 42, 44, 46, 29, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 2, 16, 3, 2, 4, 5, 3, 2, 13, 14, 3, 2, 25, 26, 3, 2, 31, 32, 4, 2, 20, 20, 34, 35, 4, 2, 27, 27, 36, 36, 4, 2, 19, 19, 41, 41, 3, 2, 42, 45, 3, 2, 46, 47, 3, 2, 48, 49, 3, 2, 50, 51, 3, 2, 56, 58, 3, 2, 59, 60, 3, 2, 52, 54, 2, 637, 2, 56, 3, 2, 2, 2, 4, 62, 3, 2, 2, 2, 6, 68, 3, 2, 2, 2, 8, 88, 3, 2, 2, 2, 10, 172, 3, 2, 2, 2, 12, 242, 3, 2, 2, 2, 14, 266, 3, 2, 2, 2, 16, 290, 3, 2, 2, 2, 18, 323, 3, 2, 2, 2, 20, 353, 3, 2, 2, 2, 22, 355, 3, 2, 2, 2, 24, 362, 3, 2, 2, 2, 26, 372, 3, 2, 2, 2, 28, 377, 3, 2, 2, 2, 30, 385, 3, 2, 2, 2, 32, 392, 3, 2, 2, 2, 34, 394, 3, 2, 2, 2, 36, 399, 3, 2, 2, 2, 38, 404, 3, 2, 2, 2, 40, 411, 3, 2, 2, 2, 42, 427, 3, 2, 2, 2, 44, 478, 3, 2, 2, 2, 46, 530, 3, 2, 2, 2, 48, 546, 3, 2, 2, 2, 50, 548, 3, 2, 2, 2, 52, 550, 3, 2, 2, 2, 54, 553, 3, 2, 2, 2, 56, 57, 5, 46, 24, 2, 57, 58, 7, 2, 2, 3, 58, 3, 3, 2, 2, 2, 59, 61, 5, 6, 4, 2, 60, 59, 3, 2, 2, 2, 61, 64, 3, 2, 2, 2, 62, 60, 3, 2, 2, 2, 62, 63, 3, 2, 2, 2, 63, 65, 3, 2, 2, 2, 64, 62, 3, 2, 2, 2, 65, 66, 5, 8, 5, 2, 66, 67, 7, 2, 2, 3, 67, 5, 3, 2, 2, 2, 68, 69, 7, 3, 2, 2, 69, 70, 9, 2, 2, 2, 70, 71, 7, 62, 2, 2, 71, 72, 7, 6, 2, 2, 72, 73, 5, 42, 22, 2, 73, 74, 7, 7, 2, 2, 74, 7, 3, 2, 2, 2, 75, 76, 7, 8, 2, 2, 76, 77, 7, 62, 2, 2, 77, 89, 7, 7, 2, 2, 78, 79, 7, 8, 2, 2, 79, 80, 7, 62, 2, 2, 80, 84, 7, 9, 2, 2, 81, 83, 5, 26, 14, 2, 82, 81, 3, 2, 2, 2, 83, 86, 3, 2, 2, 2, 84, 82, 3, 2, 2, 2, 84, 85, 3, 2, 2, 2, 85, 87, 3, 2, 2, 2, 86, 84, 3, 2, 2, 2, 87, 89, 7, 10, 2, 2, 88, 75, 3, 2, 2, 2, 88, 78, 3, 2, 2, 2, 89, 9, 3, 2, 2, 2, 90, 91, 7, 11, 2, 2, 91, 92, 7, 12, 2, 2, 92, 102, 7, 62, 2, 2, 93, 103, 3, 2, 2, 2, 94, 95, 9, 3, 2, 2, 95, 103, 5, 54, 28, 2, 96, 97, 7, 13, 2, 2, 97, 98, 7, 15, 2, 2, 98, 99, 7, 16, 2, 2, 99, 100, 5, 46, 24, 2, 100, 101, 7, 17, 2, 2, 101, 103, 3, 2, 2, 2, 102, 93, 3, 2, 2, 2, 102, 94, 3, 2, 2, 2, 102, 96, 3, 2, 2, 2, 103, 114, 3, 2, 2, 2, 104, 115, 7, 7, 2, 2, 105, 106, 7, 18, 2, 2, 106, 110, 7, 9, 2, 2, 107, 109, 5, 24, 13, 2, 108, 107, 3, 2, 2, 2, 109, 112, 3, 2, 2, 2, 110, 108, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 111, 113, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 113, 115, 7, 10, 2, 2, 114, 104, 3, 2, 2, 2, 114, 105, 3, 2, 2, 2, 115, 173, 3, 2, 2, 2, 116, 117, 7, 62, 2, 2, 117, 118, 7, 12, 2, 2, 118, 130, 7, 62, 2, 2, 119, 131, 3, 2, 2, 2, 120, 121, 7, 14, 2, 2, 121, 131, 7, 62, 2, 2, 122, 123, 7, 13, 2, 2, 123, 131, 5, 54, 28, 2, 124, 125, 7, 13, 2, 2, 125, 126, 7, 15, 2, 2, 126, 127, 7, 16, 2, 2, 127, 128, 5, 46, 24, 2, 128, 129, 7, 17, 2, 2, 129, 131, 3, 2, 2, 2, 130, 119, 3, 2, 2, 2, 130, 120, 3, 2, 2, 2, 130, 122, 3, 2, 2, 2, 130, 124, 3, 2, 2, 2, 131, 142, 3, 2, 2, 2, 132, 143, 7, 7, 2, 2, 133, 134, 7, 18, 2, 2, 134, 138, 7, 9, 2, 2, 135, 137, 5, 24, 13, 2, 136, 135, 3, 2, 2, 2, 137, 140, 3, 2, 2, 2, 138, 136, 3, 2, 2, 2, 138, 139, 3, 2, 2, 2, 139, 141, 3, 2, 2, 2, 140, 138, 3, 2, 2, 2, 141, 143, 7, 10, 2, 2, 142, 132, 3, 2, 2, 2, 142, 133, 3, 2, 2, 2, 143, 173, 3, 2, 2, 2, 144, 145, 7, 62, 2, 2, 145, 146, 7, 12, 2, 2, 146, 158, 7, 11, 2, 2, 147, 159, 3, 2, 2, 2, 148, 149, 7, 14, 2, 2, 149, 159, 7, 62, 2, 2, 150, 151, 7, 13, 2, 2, 151, 159, 5, 54, 28, 2, 152, 153, 7, 13, 2, 2, 153, 154, 7, 15, 2, 2, 154, 155, 7, 16, 2, 2, 155, 156, 5, 46, 24, 2, 156, 157, 7, 17, 2, 2, 157, 159, 3, 2, 2, 2, 158, 147, 3, 2, 2, 2, 158, 148, 3, 2, 2, 2, 158, 150, 3, 2, 2, 2, 158, 152, 3, 2, 2, 2, 159, 170, 3, 2, 2, 2, 160, 171, 7, 7, 2, 2, 161, 162, 7, 18, 2, 2, 162, 166, 7, 9, 2, 2, 163, 165, 5, 24, 13, 2, 164, 163, 3, 2, 2, 2, 165, 168, 3, 2, 2, 2, 166, 164, 3, 2, 2, 2, 166, 167, 3, 2, 2, 2, 167, 169, 3, 2, 2, 2, 168, 166, 3, 2, 2, 2, 169, 171, 7, 10, 2, 2, 170, 160, 3, 2, 2, 2, 170, 161, 3, 2, 2, 2, 171, 173, 3, 2, 2, 2, 172, 90, 3, 2, 2, 2, 172, 116, 3, 2, 2, 2, 172, 144, 3, 2, 2, 2, 173, 11, 3, 2, 2, 2, 174, 175, 7, 19, 2, 2, 175, 176, 7, 62, 2, 2, 176, 177, 7, 12, 2, 2, 177, 189, 7, 62, 2, 2, 178, 190, 3, 2, 2, 2, 179, 180, 7, 14, 2, 2, 180, 190, 7, 62, 2, 2, 181, 182, 7, 13, 2, 2, 182, 190, 5, 54, 28, 2, 183, 184, 7, 13, 2, 2, 184, 185, 7, 15, 2, 2, 185, 186, 7, 16, 2, 2, 186, 187, 5, 46, 24, 2, 187, 188, 7, 17, 2, 2, 188, 190, 3, 2, 2, 2, 189, 178, 3, 2, 2, 2, 189, 179, 3, 2, 2, 2, 189, 181, 3, 2, 2, 2, 189, 183, 3, 2, 2, 2, 190, 191, 3, 2, 2, 2, 191, 243, 7, 7, 2, 2, 192, 193, 7, 19, 2, 2, 193, 194, 7, 62, 2, 2, 194, 195, 7, 12, 2, 2, 195, 207, 7, 11, 2, 2, 196, 208, 3, 2, 2, 2, 197, 198, 7, 14, 2, 2, 198, 208, 7, 62, 2, 2, 199, 200, 7, 13, 2, 2, 200, 208, 5, 54, 28, 2, 201, 202, 7, 13, 2, 2, 202, 203, 7, 15, 2, 2, 203, 204, 7, 16, 2, 2, 204, 205, 5, 46, 24, 2, 205, 206, 7, 17, 2, 2, 206, 208, 3, 2, 2, 2, 207, 196, 3, 2, 2, 2, 207, 197, 3, 2, 2, 2, 207, 199, 3, 2, 2, 2, 207, 201, 3, 2, 2, 2, 208, 209, 3, 2, 2, 2, 209, 243, 7, 7, 2, 2, 210, 211, 7, 19, 2, 2, 211, 212, 7, 20, 2, 2, 212, 213, 7, 12, 2, 2, 213, 223, 7, 62, 2, 2, 214, 224, 3, 2, 2, 2, 215, 216, 9, 3, 2, 2, 216, 224, 5, 54, 28, 2, 217, 218, 7, 13, 2, 2, 218, 219, 7, 15, 2, 2, 219, 220, 7, 16, 2, 2, 220, 221, 5, 46, 24, 2, 221, 222, 7, 17, 2, 2, 222, 224, 3, 2, 2, 2, 223, 214, 3, 2, 2, 2, 223, 215, 3, 2, 2, 2, 223, 217, 3, 2, 2, 2, 224, 225, 3, 2, 2, 2, 225, 243, 7, 7, 2, 2, 226, 227, 7, 19, 2, 2, 227, 228, 7, 20, 2, 2, 228, 229, 7, 12, 2, 2, 229, 239, 7, 11, 2, 2, 230, 240, 3, 2, 2, 2, 231, 232, 9, 3, 2, 2, 232, 240, 5, 54, 28, 2, 233, 234, 7, 13, 2, 2, 234, 235, 7, 15, 2, 2, 235, 236, 7, 16, 2, 2, 236, 237, 5, 46, 24, 2, 237, 238, 7, 17, 2, 2, 238, 240, 3, 2, 2, 2, 239, 230, 3, 2, 2, 2, 239, 231, 3, 2, 2, 2, 239, 233, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 243, 7, 7, 2, 2, 242, 174, 3, 2, 2, 2, 242, 192, 3, 2, 2, 2, 242, 210, 3, 2, 2, 2, 242, 226, 3, 2, 2, 2, 243, 13, 3, 2, 2, 2, 244, 246, 7, 21, 2, 2, 245, 247, 7, 62, 2, 2, 246, 245, 3, 2, 2, 2, 246, 247, 3, 2, 2, 2, 247, 248, 3, 2, 2, 2, 248, 252, 7, 9, 2, 2, 249, 251, 5, 24, 13, 2, 250, 249, 3, 2, 2, 2, 251, 254, 3, 2, 2, 2, 252, 250, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 255, 3, 2, 2, 2, 254, 252, 3, 2, 2, 2, 255, 267, 7, 10, 2, 2, 256, 257, 7, 21, 2, 2, 257, 258, 7, 22, 2, 2, 258, 259, 7, 62, 2, 2, 259, 267, 7, 7, 2, 2, 260, 261, 7, 21, 2, 2, 261, 263, 7, 22, 2, 2, 262, 264, 7, 62, 2, 2, 263, 262, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 265, 3, 2, 2, 2, 265, 267, 7, 65, 2, 2, 266, 244, 3, 2, 2, 2, 266, 256, 3, 2, 2, 2, 266, 260, 3, 2, 2, 2, 267, 15, 3, 2, 2, 2, 268, 270, 7, 23, 2, 2, 269, 271, 7, 62, 2, 2, 270, 269, 3, 2, 2, 2, 270, 271, 3, 2, 2, 2, 271, 272, 3, 2, 2, 2, 272, 276, 7, 9, 2, 2, 273, 275, 5, 24, 13, 2, 274, 273, 3, 2, 2, 2, 275, 278, 3, 2, 2, 2, 276, 274, 3, 2, 2, 2, 276, 277, 3, 2, 2, 2, 277, 279, 3, 2, 2, 2, 278, 276, 3, 2, 2, 2, 279, 291, 7, 10, 2, 2, 280, 281, 7, 23, 2, 2, 281, 282, 7, 22, 2, 2, 282, 283, 7, 62, 2, 2, 283, 291, 7, 7, 2, 2, 284, 285, 7, 23, 2, 2, 285, 287, 7, 22, 2, 2, 286, 288, 7, 62, 2, 2, 287, 286, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 289, 3, 2, 2, 2, 289, 291, 7, 65, 2, 2, 290, 268, 3, 2, 2, 2, 290, 280, 3, 2, 2, 2, 290, 284, 3, 2, 2, 2, 291, 17, 3, 2, 2, 2, 292, 294, 7, 24, 2, 2, 293, 295, 9, 4, 2, 2, 294, 293, 3, 2, 2, 2, 294, 295, 3, 2, 2, 2, 295, 297, 3, 2, 2, 2, 296, 298, 7, 62, 2, 2, 297, 296, 3, 2, 2, 2, 297, 298, 3, 2, 2, 2, 298, 299, 3, 2, 2, 2, 299, 303, 7, 9, 2, 2, 300, 302, 5, 24, 13, 2, 301, 300, 3, 2, 2, 2, 302, 305, 3, 2, 2, 2, 303, 301, 3, 2, 2, 2, 303, 304, 3, 2, 2, 2, 304, 306, 3, 2, 2, 2, 305, 303, 3, 2, 2, 2, 306, 324, 7, 10, 2, 2, 307, 309, 7, 24, 2, 2, 308, 310, 9, 4, 2, 2, 309, 308, 3, 2, 2, 2, 309, 310, 3, 2, 2, 2, 310, 311, 3, 2, 2, 2, 311, 312, 7, 22, 2, 2, 312, 313, 7, 62, 2, 2, 313, 324, 7, 7, 2, 2, 314, 316, 7, 24, 2, 2, 315, 317, 9, 4, 2, 2, 316, 315, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 318, 3, 2, 2, 2, 318, 320, 7, 22, 2, 2, 319, 321, 7, 62, 2, 2, 320, 319, 3, 2, 2, 2, 320, 321, 3, 2, 2, 2, 321, 322, 3, 2, 2, 2, 322, 324, 7, 65, 2, 2, 323, 292, 3, 2, 2, 2, 323, 307, 3, 2, 2, 2, 323, 314, 3, 2, 2, 2, 324, 19, 3, 2, 2, 2, 325, 326, 7, 27, 2, 2, 326, 327, 7, 24, 2, 2, 327, 329, 9, 4, 2, 2, 328, 330, 7, 62, 2, 2, 329, 328, 3, 2, 2, 2, 329, 330, 3, 2, 2, 2, 330, 331, 3, 2, 2, 2, 331, 335, 7, 9, 2, 2, 332, 334, 5, 24, 13, 2, 333, 332, 3, 2, 2, 2, 334, 337, 3, 2, 2, 2, 335, 333, 3, 2, 2, 2, 335, 336, 3, 2, 2, 2, 336, 338, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 338, 354, 7, 10, 2, 2, 339, 340, 7, 27, 2, 2, 340, 341, 7, 24, 2, 2, 341, 342, 9, 4, 2, 2, 342, 343, 7, 22, 2, 2, 343, 344, 7, 62, 2, 2, 344, 354, 7, 7, 2, 2, 345, 346, 7, 27, 2, 2, 346, 347, 7, 24, 2, 2, 347, 348, 9, 4, 2, 2, 348, 350, 7, 22, 2, 2, 349, 351, 7, 62, 2, 2, 350, 349, 3, 2, 2, 2, 350, 351, 3, 2, 2, 2, 351, 352, 3, 2, 2, 2, 352, 354, 7, 65, 2, 2, 353, 325, 3, 2, 2, 2, 353, 339, 3, 2, 2, 2, 353, 345, 3, 2, 2, 2, 354, 21, 3, 2, 2, 2, 355, 356, 7, 62, 2, 2, 356, 357, 7, 6, 2, 2, 357, 358, 5, 44, 23, 2, 358, 359, 7, 7, 2, 2, 359, 23, 3, 2, 2, 2, 360, 363, 5, 22, 12, 2, 361, 363, 7, 7, 2, 2, 362, 360, 3, 2, 2, 2, 362, 361, 3, 2, 2, 2, 363, 25, 3, 2, 2, 2, 364, 373, 5, 8, 5, 2, 365, 373, 5, 10, 6, 2, 366, 373, 5, 12, 7, 2, 367, 373, 5, 14, 8, 2, 368, 373, 5, 18, 10, 2, 369, 373, 5, 16, 9, 2, 370, 373, 5, 20, 11, 2, 371, 373, 7, 7, 2, 2, 372, 364, 3, 2, 2, 2, 372, 365, 3, 2, 2, 2, 372, 366, 3, 2, 2, 2, 372, 367, 3, 2, 2, 2, 372, 368, 3, 2, 2, 2, 372, 369, 3, 2, 2, 2, 372, 370, 3, 2, 2, 2, 372, 371, 3, 2, 2, 2, 373, 27, 3, 2, 2, 2, 374, 376, 5, 38, 20, 2, 375, 374, 3, 2, 2, 2, 376, 379, 3, 2, 2, 2, 377, 375, 3, 2, 2, 2, 377, 378, 3, 2, 2, 2, 378, 380, 3, 2, 2, 2, 379, 377, 3, 2, 2, 2, 380, 381, 7, 2, 2, 3, 381, 29, 3, 2, 2, 2, 382, 384, 5, 32, 17, 2, 383, 382, 3, 2, 2, 2, 384, 387, 3, 2, 2, 2, 385, 383, 3, 2, 2, 2, 385, 386, 3, 2, 2, 2, 386, 388, 3, 2, 2, 2, 387, 385, 3, 2, 2, 2, 388, 389, 7, 2, 2, 3, 389, 31, 3, 2, 2, 2, 390, 393, 5, 34, 18, 2, 391, 393, 5, 36, 19, 2, 392, 390, 3, 2, 2, 2, 392, 391, 3, 2, 2, 2, 393, 33, 3, 2, 2, 2, 394, 395, 7, 62, 2, 2, 395, 396, 7, 28, 2, 2, 396, 397, 5, 42, 22, 2, 397, 398, 7, 7, 2, 2, 398, 35, 3, 2, 2, 2, 399, 400, 7, 62, 2, 2, 400, 401, 7, 6, 2, 2, 401, 402, 5, 42, 22, 2, 402, 403, 7, 7, 2, 2, 403, 37, 3, 2, 2, 2, 404, 405, 7, 62, 2, 2, 405, 406, 7, 28, 2, 2, 406, 407, 5, 44, 23, 2, 407, 408, 7, 7, 2, 2, 408, 39, 3, 2, 2, 2, 409, 412, 5, 44, 23, 2, 410, 412, 5, 46, 24, 2, 411, 409, 3, 2, 2, 2, 411, 410, 3, 2, 2, 2, 412, 41, 3, 2, 2, 2, 413, 414, 8, 22, 1, 2, 414, 415, 7, 29, 2, 2, 415, 416, 5, 42, 22, 2, 416, 417, 7, 30, 2, 2, 417, 428, 3, 2, 2, 2, 418, 428, 5, 48, 25, 2, 419, 428, 5, 52, 27, 2, 420, 421, 9, 5, 2, 2, 421, 428, 5, 42, 22, 11, 422, 423, 7, 61, 2, 2, 423, 424, 7, 29, 2, 2, 424, 425, 5, 42, 22, 2, 425, 426, 7, 30, 2, 2, 426, 428, 3, 2, 2, 2, 427, 413, 3, 2, 2, 2, 427, 418, 3, 2, 2, 2, 427, 419, 3, 2, 2, 2, 427, 420, 3, 2, 2, 2, 427, 422, 3, 2, 2, 2, 428, 452, 3, 2, 2, 2, 429, 430, 12, 10, 2, 2, 430, 431, 7, 33, 2, 2, 431, 451, 5, 42, 22, 10, 432, 433, 12, 9, 2, 2, 433, 434, 9, 6, 2, 2, 434, 451, 5, 42, 22, 10, 435, 436, 12, 8, 2, 2, 436, 437, 9, 5, 2, 2, 437, 451, 5, 42, 22, 9, 438, 439, 12, 7, 2, 2, 439, 440, 9, 7, 2, 2, 440, 451, 5, 42, 22, 8, 441, 442, 12, 6, 2, 2, 442, 443, 7, 37, 2, 2, 443, 451, 5, 42, 22, 7, 444, 445, 12, 5, 2, 2, 445, 446, 7, 38, 2, 2, 446, 451, 5, 42, 22, 6, 447, 448, 12, 4, 2, 2, 448, 449, 7, 39, 2, 2, 449, 451, 5, 42, 22, 5, 450, 429, 3, 2, 2, 2, 450, 432, 3, 2, 2, 2, 450, 435, 3, 2, 2, 2, 450, 438, 3, 2, 2, 2, 450, 441, 3, 2, 2, 2, 450, 444, 3, 2, 2, 2, 450, 447, 3, 2, 2, 2, 451, 454, 3, 2, 2, 2, 452, 450, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 43, 3, 2, 2, 2, 454, 452, 3, 2, 2, 2, 455, 456, 8, 23, 1, 2, 456, 457, 7, 29, 2, 2, 457, 458, 5, 44, 23, 2, 458, 459, 7, 30, 2, 2, 459, 479, 3, 2, 2, 2, 460, 479, 5, 48, 25, 2, 461, 479, 7, 62, 2, 2, 462, 479, 5, 52, 27, 2, 463, 464, 9, 5, 2, 2, 464, 479, 5, 44, 23, 12, 465, 466, 7, 61, 2, 2, 466, 467, 7, 29, 2, 2, 467, 468, 5, 44, 23, 2, 468, 469, 7, 30, 2, 2, 469, 479, 3, 2, 2, 2, 470, 471, 7, 29, 2, 2, 471, 472, 5, 46, 24, 2, 472, 473, 7, 30, 2, 2, 473, 474, 7, 40, 2, 2, 474, 475, 5, 44, 23, 2, 475, 476, 7, 13, 2, 2, 476, 477, 5, 44, 23, 3, 477, 479, 3, 2, 2, 2, 478, 455, 3, 2, 2, 2, 478, 460, 3, 2, 2, 2, 478, 461, 3, 2, 2, 2, 478, 462, 3, 2, 2, 2, 478, 463, 3, 2, 2, 2, 478, 465, 3, 2, 2, 2, 478, 470, 3, 2, 2, 2, 479, 503, 3, 2, 2, 2, 480, 481, 12, 11, 2, 2, 481, 482, 7, 33, 2, 2, 482, 502, 5, 44, 23, 11, 483, 484, 12, 10, 2, 2, 484, 485, 9, 6, 2, 2, 485, 502, 5, 44, 23, 11, 486, 487, 12, 9, 2, 2, 487, 488, 9, 5, 2, 2, 488, 502, 5, 44, 23, 10, 489, 490, 12, 8, 2, 2, 490, 491, 9, 7, 2, 2, 491, 502, 5, 44, 23, 9, 492, 493, 12, 7, 2, 2, 493, 494, 7, 37, 2, 2, 494, 502, 5, 44, 23, 8, 495, 496, 12, 6, 2, 2, 496, 497, 7, 38, 2, 2, 497, 502, 5, 44, 23, 7, 498, 499, 12, 5, 2, 2, 499, 500, 7, 39, 2, 2, 500, 502, 5, 44, 23, 6, 501, 480, 3, 2, 2, 2, 501, 483, 3, 2, 2, 2, 501, 486, 3, 2, 2, 2, 501, 489, 3, 2, 2, 2, 501, 492, 3, 2, 2, 2, 501, 495, 3, 2, 2, 2, 501, 498, 3, 2, 2, 2, 502, 505, 3, 2, 2, 2, 503, 501, 3, 2, 2, 2, 503, 504, 3, 2, 2, 2, 504, 45, 3, 2, 2, 2, 505, 503, 3, 2, 2, 2, 506, 507, 8, 24, 1, 2, 507, 508, 7, 29, 2, 2, 508, 509, 5, 46, 24, 2, 509, 510, 7, 30, 2, 2, 510, 531, 3, 2, 2, 2, 511, 531, 5, 50, 26, 2, 512, 513, 9, 8, 2, 2, 513, 531, 5, 46, 24, 9, 514, 515, 5, 44, 23, 2, 515, 516, 9, 9, 2, 2, 516, 517, 5, 44, 23, 2, 517, 531, 3, 2, 2, 2, 518, 519, 5, 44, 23, 2, 519, 520, 9, 10, 2, 2, 520, 521, 5, 44, 23, 2, 521, 531, 3, 2, 2, 2, 522, 523, 7, 29, 2, 2, 523, 524, 5, 46, 24, 2, 524, 525, 7, 30, 2, 2, 525, 526, 7, 40, 2, 2, 526, 527, 5, 46, 24, 2, 527, 528, 7, 13, 2, 2, 528, 529, 5, 46, 24, 3, 529, 531, 3, 2, 2, 2, 530, 506, 3, 2, 2, 2, 530, 511, 3, 2, 2, 2, 530, 512, 3, 2, 2, 2, 530, 514, 3, 2, 2, 2, 530, 518, 3, 2, 2, 2, 530, 522, 3, 2, 2, 2, 531, 543, 3, 2, 2, 2, 532, 533, 12, 6, 2, 2, 533, 534, 9, 10, 2, 2, 534, 542, 5, 46, 24, 7, 535, 536, 12, 5, 2, 2, 536, 537, 9, 11, 2, 2, 537, 542, 5, 46, 24, 6, 538, 539, 12, 4, 2, 2, 539, 540, 9, 12, 2, 2, 540, 542, 5, 46, 24, 5, 541, 532, 3, 2, 2, 2, 541, 535, 3, 2, 2, 2, 541, 538, 3, 2, 2, 2, 542, 545, 3, 2, 2, 2, 543, 541, 3, 2, 2, 2, 543, 544, 3, 2, 2, 2, 544, 47, 3, 2, 2, 2, 545, 543, 3, 2, 2, 2, 546, 547, 9, 13, 2, 2, 547, 49, 3, 2, 2, 2, 548, 549, 9, 14, 2, 2, 549, 51, 3, 2, 2, 2, 550, 551, 9, 15, 2, 2, 551, 53, 3, 2, 2, 2, 552, 554, 7, 34, 2, 2, 553, 552, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 560, 7, 62, 2, 2, 556, 557, 7, 55, 2, 2, 557, 559, 7, 62, 2, 2, 558, 556, 3, 2, 2, 2, 559, 562, 3, 2, 2, 2, 560, 558, 3, 2, 2, 2, 560, 561, 3, 2, 2, 2, 561, 55, 3, 2, 2, 2, 562, 560, 3, 2, 2, 2, 56, 62, 84, 88, 102, 110, 114, 130, 138, 142, 158, 166, 170, 172, 189, 207, 223, 239, 242, 246, 252, 263, 266, 270, 276, 287, 290, 294, 297, 303, 309, 316, 320, 323, 329, 335, 350, 353, 362, 372, 377, 385, 392, 411, 427, 450, 452, 478, 501, 503, 530, 541, 543, 553, 560]