From 89532564ea91dd2cc9c9c239f9669af83fb8cef4 Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Thu, 17 Oct 2024 11:08:09 +0200 Subject: [PATCH] add explicit output parameters to spiking output port --- .../neuromodulated_stdp_synapse.nestml | 2 +- models/synapses/noisy_synapse.nestml | 2 +- models/synapses/static_synapse.nestml | 2 +- .../stdp_nn_pre_centered_synapse.nestml | 2 +- .../stdp_nn_restr_symm_synapse.nestml | 2 +- models/synapses/stdp_nn_symm_synapse.nestml | 2 +- models/synapses/stdp_synapse.nestml | 2 +- models/synapses/stdp_triplet_synapse.nestml | 2 +- .../co_co_output_port_defined_if_emit_call.py | 51 +- .../codegeneration/printers/nestml_printer.py | 8 + pynestml/generated/PyNestMLLexer.py | 506 +++---- pynestml/generated/PyNestMLParser.py | 1313 +++++++++-------- pynestml/generated/PyNestMLParserVisitor.py | 4 +- pynestml/grammars/PyNestMLLexer.g4 | 5 +- pynestml/grammars/PyNestMLParser.g4 | 9 +- pynestml/meta_model/ast_function_call.py | 7 +- pynestml/meta_model/ast_node_factory.py | 7 +- pynestml/meta_model/ast_output_block.py | 24 +- pynestml/utils/messages.py | 9 + pynestml/visitors/ast_builder_visitor.py | 12 +- .../CoCoOutputPortTypeIfEmitCall-2.nestml | 37 + .../CoCoOutputPortTypeIfEmitCall-3.nestml | 37 + .../CoCoOutputPortTypeIfEmitCall.nestml | 37 + tests/test_cocos.py | 26 +- 24 files changed, 1230 insertions(+), 878 deletions(-) create mode 100644 tests/invalid/CoCoOutputPortTypeIfEmitCall-2.nestml create mode 100644 tests/invalid/CoCoOutputPortTypeIfEmitCall-3.nestml create mode 100644 tests/invalid/CoCoOutputPortTypeIfEmitCall.nestml diff --git a/models/synapses/neuromodulated_stdp_synapse.nestml b/models/synapses/neuromodulated_stdp_synapse.nestml index 4fe77d56c..236968417 100644 --- a/models/synapses/neuromodulated_stdp_synapse.nestml +++ b/models/synapses/neuromodulated_stdp_synapse.nestml @@ -56,7 +56,7 @@ model neuromodulated_stdp_synapse: mod_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(mod_spikes): n += 1. / tau_n diff --git a/models/synapses/noisy_synapse.nestml b/models/synapses/noisy_synapse.nestml index 8a1d0bbfa..3f776fc1d 100644 --- a/models/synapses/noisy_synapse.nestml +++ b/models/synapses/noisy_synapse.nestml @@ -17,7 +17,7 @@ model noisy_synapse: pre_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(pre_spikes): # temporary variable for the "weight" that will be transmitted diff --git a/models/synapses/static_synapse.nestml b/models/synapses/static_synapse.nestml index 097dcae6b..043a9463f 100644 --- a/models/synapses/static_synapse.nestml +++ b/models/synapses/static_synapse.nestml @@ -15,7 +15,7 @@ model static_synapse: pre_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(pre_spikes): emit_spike(w, d) diff --git a/models/synapses/stdp_nn_pre_centered_synapse.nestml b/models/synapses/stdp_nn_pre_centered_synapse.nestml index 2787d26ed..1d51bb481 100644 --- a/models/synapses/stdp_nn_pre_centered_synapse.nestml +++ b/models/synapses/stdp_nn_pre_centered_synapse.nestml @@ -79,7 +79,7 @@ model stdp_nn_pre_centered_synapse: post_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(post_spikes): post_trace = 1 diff --git a/models/synapses/stdp_nn_restr_symm_synapse.nestml b/models/synapses/stdp_nn_restr_symm_synapse.nestml index 86efefbff..9ca9e6360 100644 --- a/models/synapses/stdp_nn_restr_symm_synapse.nestml +++ b/models/synapses/stdp_nn_restr_symm_synapse.nestml @@ -72,7 +72,7 @@ model stdp_nn_restr_symm_synapse: post_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(post_spikes): post_trace = 1 diff --git a/models/synapses/stdp_nn_symm_synapse.nestml b/models/synapses/stdp_nn_symm_synapse.nestml index 22cb9d565..55bc413a5 100644 --- a/models/synapses/stdp_nn_symm_synapse.nestml +++ b/models/synapses/stdp_nn_symm_synapse.nestml @@ -76,7 +76,7 @@ model stdp_nn_symm_synapse: post_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(post_spikes): post_trace = 1 diff --git a/models/synapses/stdp_synapse.nestml b/models/synapses/stdp_synapse.nestml index f04b4b971..da2893391 100644 --- a/models/synapses/stdp_synapse.nestml +++ b/models/synapses/stdp_synapse.nestml @@ -59,7 +59,7 @@ model stdp_synapse: post_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(post_spikes): post_trace += 1 diff --git a/models/synapses/stdp_triplet_synapse.nestml b/models/synapses/stdp_triplet_synapse.nestml index dd7ca2bd1..bef9c8c54 100644 --- a/models/synapses/stdp_triplet_synapse.nestml +++ b/models/synapses/stdp_triplet_synapse.nestml @@ -56,7 +56,7 @@ model stdp_triplet_synapse: post_spikes <- spike output: - spike + spike(weight real, delay ms) onReceive(post_spikes): # potentiate synapse diff --git a/pynestml/cocos/co_co_output_port_defined_if_emit_call.py b/pynestml/cocos/co_co_output_port_defined_if_emit_call.py index 9157115ac..24bdd13af 100644 --- a/pynestml/cocos/co_co_output_port_defined_if_emit_call.py +++ b/pynestml/cocos/co_co_output_port_defined_if_emit_call.py @@ -24,6 +24,8 @@ from pynestml.cocos.co_co import CoCo from pynestml.meta_model.ast_function_call import ASTFunctionCall from pynestml.meta_model.ast_model import ASTModel +from pynestml.symbols.predefined_functions import PredefinedFunctions +from pynestml.utils.ast_utils import ASTUtils from pynestml.utils.logger import Logger, LoggingLevel from pynestml.utils.messages import Messages from pynestml.visitors.ast_visitor import ASTVisitor @@ -60,22 +62,55 @@ def visit_function_call(self, node: ASTFunctionCall): """ assert self.neuron is not None func_name = node.get_name() - if func_name == 'emit_spike': + if func_name == PredefinedFunctions.EMIT_SPIKE: output_blocks = self.neuron.get_output_blocks() - if not output_blocks: + + # exactly one output block should be defined + if len(output_blocks) == 0: code, message = Messages.get_block_not_defined_correctly('output', missing=True) Logger.log_message(error_position=node.get_source_position(), log_level=LoggingLevel.ERROR, code=code, message=message) return - spike_output_exists = False - for output_block in output_blocks: - if output_block.is_spike(): - spike_output_exists = True - break + if len(output_blocks) > 1: + code, message = Messages.get_block_not_defined_correctly('output', missing=False) + Logger.log_message(error_position=node.get_source_position(), log_level=LoggingLevel.ERROR, + code=code, message=message) + return - if not spike_output_exists: + assert len(output_blocks) == 1 + + if not output_blocks[0].is_spike(): code, message = Messages.get_emit_spike_function_but_no_output_port() Logger.log_message(code=code, message=message, log_level=LoggingLevel.ERROR, error_position=node.get_source_position()) return + + # check types + if len(node.get_args()) != len(output_blocks[0].get_attributes()): + code, message = Messages.get_output_port_type_differs() + Logger.log_message(code=code, message=message, log_level=LoggingLevel.ERROR, + error_position=node.get_source_position()) + return + + for emit_spike_arg, output_block_attr in zip(node.get_args(), output_blocks[0].get_attributes()): + + emit_spike_arg_type_sym = emit_spike_arg.type + output_block_attr_type_sym = output_block_attr.get_data_type().get_type_symbol() + + if emit_spike_arg_type_sym.equals(output_block_attr_type_sym): + continue + + if emit_spike_arg_type_sym.is_castable_to(output_block_attr_type_sym): + # types are not equal, but castable + code, message = Messages.get_implicit_cast_rhs_to_lhs(output_block_attr_type_sym.print_symbol(), + emit_spike_arg_type_sym.print_symbol()) + Logger.log_message(error_position=node.get_source_position(), + code=code, message=message, log_level=LoggingLevel.WARNING) + continue + else: + # types are not equal and not castable + code, message = Messages.get_output_port_type_differs() + Logger.log_message(code=code, message=message, log_level=LoggingLevel.ERROR, + error_position=node.get_source_position()) + return diff --git a/pynestml/codegeneration/printers/nestml_printer.py b/pynestml/codegeneration/printers/nestml_printer.py index f03d9931d..481fc9a6a 100644 --- a/pynestml/codegeneration/printers/nestml_printer.py +++ b/pynestml/codegeneration/printers/nestml_printer.py @@ -431,6 +431,14 @@ def print_output_block(self, node: ASTOutputBlock) -> str: ret += print_n_spaces(self.indent) + "output:\n" ret += print_n_spaces(self.indent + 4) ret += "spike" if node.is_spike() else "continuous" + if node.get_attributes(): + ret += "(" + for i, attr in enumerate(node.get_attributes()): + ret += self.print(attr) + if i < len(node.get_attributes()) - 1: + ret += ", " + + ret += ")" ret += print_sl_comment(node.in_comment) ret += "\n" return ret diff --git a/pynestml/generated/PyNestMLLexer.py b/pynestml/generated/PyNestMLLexer.py index d430d8556..e1fda7af4 100644 --- a/pynestml/generated/PyNestMLLexer.py +++ b/pynestml/generated/PyNestMLLexer.py @@ -1,4 +1,4 @@ -# Generated from PyNestMLLexer.g4 by ANTLR 4.13.1 +# Generated from PyNestMLLexer.g4 by ANTLR 4.10.1 from antlr4 import * from io import StringIO import sys @@ -8,14 +8,14 @@ from typing.io import TextIO -if "." in __name__: +if __name__ is not None and "." in __name__: from .PyNestMLLexerBase import PyNestMLLexerBase else: from PyNestMLLexerBase import PyNestMLLexerBase def serializedATN(): return [ - 4,0,90,702,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, + 4,0,91,707,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, 2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2, 13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7, 19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2, @@ -29,243 +29,244 @@ def serializedATN(): 71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2, 78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7, 84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2, - 91,7,91,1,0,1,0,1,0,1,0,1,1,3,1,191,8,1,1,1,1,1,1,2,1,2,1,2,3,2, - 198,8,2,1,3,4,3,201,8,3,11,3,12,3,202,1,3,1,3,1,4,1,4,1,4,1,4,1, - 4,1,5,1,5,5,5,214,8,5,10,5,12,5,217,9,5,1,5,1,5,4,5,221,8,5,11,5, - 12,5,222,1,5,1,5,1,6,1,6,5,6,229,8,6,10,6,12,6,232,9,6,1,6,1,6,1, - 7,1,7,1,7,3,7,239,8,7,1,7,1,7,1,7,3,7,244,8,7,3,7,246,8,7,1,7,1, - 7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,10,1,10, - 1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11, - 1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13, - 1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15, - 1,15,1,15,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18, - 1,18,1,18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,21, - 1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,24,1,24, - 1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27, - 1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28, - 1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30, - 1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32, - 1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33, - 1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35, - 1,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37, - 1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38, - 1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39, - 1,39,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,41, - 1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42, - 1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43, - 1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44, - 1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,46, - 1,46,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,50,1,50,1,51,1,51, - 1,52,1,52,1,53,1,53,1,54,1,54,1,55,1,55,1,55,1,56,1,56,1,57,1,57, - 1,57,1,58,1,58,1,58,1,59,1,59,1,59,1,60,1,60,1,60,1,61,1,61,1,62, - 1,62,1,63,1,63,1,63,1,64,1,64,1,64,1,65,1,65,1,65,1,66,1,66,1,66, - 1,67,1,67,1,67,1,68,1,68,1,68,1,69,1,69,1,69,1,70,1,70,1,70,1,71, - 1,71,1,71,1,72,1,72,1,73,1,73,1,74,1,74,1,75,1,75,1,76,1,76,1,76, - 1,77,1,77,1,78,1,78,1,79,1,79,1,80,1,80,1,81,1,81,1,81,1,82,1,82, - 1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84, - 1,84,1,84,1,84,1,84,1,84,1,84,1,84,3,84,636,8,84,1,85,1,85,1,85, - 4,85,641,8,85,11,85,12,85,642,1,85,3,85,646,8,85,1,85,3,85,649,8, - 85,1,85,3,85,652,8,85,1,85,5,85,655,8,85,10,85,12,85,658,9,85,1, - 85,1,85,1,86,3,86,663,8,86,1,86,5,86,666,8,86,10,86,12,86,669,9, - 86,1,87,4,87,672,8,87,11,87,12,87,673,1,88,1,88,3,88,678,8,88,1, - 89,3,89,681,8,89,1,89,1,89,1,89,1,89,1,89,3,89,688,8,89,1,90,1,90, - 3,90,692,8,90,1,90,1,90,1,90,1,91,1,91,3,91,699,8,91,1,91,1,91,2, - 215,222,0,92,1,3,3,0,5,4,7,5,9,6,11,7,13,8,15,9,17,10,19,11,21,12, - 23,13,25,14,27,15,29,16,31,17,33,18,35,19,37,20,39,21,41,22,43,23, - 45,24,47,25,49,26,51,27,53,28,55,29,57,30,59,31,61,32,63,33,65,34, - 67,35,69,36,71,37,73,38,75,39,77,40,79,41,81,42,83,43,85,44,87,45, - 89,46,91,47,93,48,95,49,97,50,99,51,101,52,103,53,105,54,107,55, - 109,56,111,57,113,58,115,59,117,60,119,61,121,62,123,63,125,64,127, - 65,129,66,131,67,133,68,135,69,137,70,139,71,141,72,143,73,145,74, - 147,75,149,76,151,77,153,78,155,79,157,80,159,81,161,82,163,83,165, - 84,167,85,169,86,171,87,173,88,175,89,177,90,179,0,181,0,183,0,1, - 0,7,2,0,9,9,32,32,2,0,10,10,13,13,4,0,10,10,13,13,34,34,92,92,4, - 0,36,36,65,90,95,95,97,122,5,0,36,36,48,57,65,90,95,95,97,122,1, - 0,48,57,2,0,69,69,101,101,723,0,1,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0, - 0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0, - 0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0, - 0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0, - 0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0, - 0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0, - 0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0, - 0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0, - 0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0, - 0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0, - 0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1, - 0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0, - 117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0, - 0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135, - 1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0, - 0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1, - 0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0, - 163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0, - 0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,1,185,1,0,0,0,3,190, - 1,0,0,0,5,194,1,0,0,0,7,200,1,0,0,0,9,206,1,0,0,0,11,211,1,0,0,0, - 13,226,1,0,0,0,15,245,1,0,0,0,17,249,1,0,0,0,19,257,1,0,0,0,21,262, - 1,0,0,0,23,269,1,0,0,0,25,277,1,0,0,0,27,282,1,0,0,0,29,291,1,0, - 0,0,31,298,1,0,0,0,33,305,1,0,0,0,35,308,1,0,0,0,37,313,1,0,0,0, - 39,318,1,0,0,0,41,322,1,0,0,0,43,328,1,0,0,0,45,331,1,0,0,0,47,336, - 1,0,0,0,49,340,1,0,0,0,51,344,1,0,0,0,53,347,1,0,0,0,55,351,1,0, - 0,0,57,362,1,0,0,0,59,369,1,0,0,0,61,375,1,0,0,0,63,381,1,0,0,0, - 65,392,1,0,0,0,67,402,1,0,0,0,69,409,1,0,0,0,71,419,1,0,0,0,73,425, - 1,0,0,0,75,432,1,0,0,0,77,443,1,0,0,0,79,453,1,0,0,0,81,465,1,0, - 0,0,83,471,1,0,0,0,85,482,1,0,0,0,87,493,1,0,0,0,89,506,1,0,0,0, - 91,521,1,0,0,0,93,523,1,0,0,0,95,527,1,0,0,0,97,529,1,0,0,0,99,531, - 1,0,0,0,101,533,1,0,0,0,103,535,1,0,0,0,105,537,1,0,0,0,107,539, - 1,0,0,0,109,541,1,0,0,0,111,543,1,0,0,0,113,546,1,0,0,0,115,548, - 1,0,0,0,117,551,1,0,0,0,119,554,1,0,0,0,121,557,1,0,0,0,123,560, - 1,0,0,0,125,562,1,0,0,0,127,564,1,0,0,0,129,567,1,0,0,0,131,570, - 1,0,0,0,133,573,1,0,0,0,135,576,1,0,0,0,137,579,1,0,0,0,139,582, - 1,0,0,0,141,585,1,0,0,0,143,588,1,0,0,0,145,591,1,0,0,0,147,593, - 1,0,0,0,149,595,1,0,0,0,151,597,1,0,0,0,153,599,1,0,0,0,155,602, - 1,0,0,0,157,604,1,0,0,0,159,606,1,0,0,0,161,608,1,0,0,0,163,610, - 1,0,0,0,165,613,1,0,0,0,167,615,1,0,0,0,169,635,1,0,0,0,171,637, - 1,0,0,0,173,662,1,0,0,0,175,671,1,0,0,0,177,677,1,0,0,0,179,687, - 1,0,0,0,181,691,1,0,0,0,183,698,1,0,0,0,185,186,5,34,0,0,186,187, - 5,34,0,0,187,188,5,34,0,0,188,2,1,0,0,0,189,191,5,13,0,0,190,189, - 1,0,0,0,190,191,1,0,0,0,191,192,1,0,0,0,192,193,5,10,0,0,193,4,1, - 0,0,0,194,195,3,145,72,0,195,197,3,3,1,0,196,198,3,7,3,0,197,196, - 1,0,0,0,197,198,1,0,0,0,198,6,1,0,0,0,199,201,7,0,0,0,200,199,1, - 0,0,0,201,202,1,0,0,0,202,200,1,0,0,0,202,203,1,0,0,0,203,204,1, - 0,0,0,204,205,6,3,0,0,205,8,1,0,0,0,206,207,5,92,0,0,207,208,3,3, - 1,0,208,209,1,0,0,0,209,210,6,4,0,0,210,10,1,0,0,0,211,215,3,1,0, - 0,212,214,9,0,0,0,213,212,1,0,0,0,214,217,1,0,0,0,215,216,1,0,0, - 0,215,213,1,0,0,0,216,218,1,0,0,0,217,215,1,0,0,0,218,220,3,1,0, - 0,219,221,3,3,1,0,220,219,1,0,0,0,221,222,1,0,0,0,222,223,1,0,0, - 0,222,220,1,0,0,0,223,224,1,0,0,0,224,225,6,5,1,0,225,12,1,0,0,0, - 226,230,5,35,0,0,227,229,8,1,0,0,228,227,1,0,0,0,229,232,1,0,0,0, - 230,228,1,0,0,0,230,231,1,0,0,0,231,233,1,0,0,0,232,230,1,0,0,0, - 233,234,6,6,1,0,234,14,1,0,0,0,235,236,4,7,0,0,236,246,3,7,3,0,237, - 239,5,13,0,0,238,237,1,0,0,0,238,239,1,0,0,0,239,240,1,0,0,0,240, - 241,5,10,0,0,241,243,1,0,0,0,242,244,3,7,3,0,243,242,1,0,0,0,243, - 244,1,0,0,0,244,246,1,0,0,0,245,235,1,0,0,0,245,238,1,0,0,0,246, - 247,1,0,0,0,247,248,6,7,2,0,248,16,1,0,0,0,249,250,5,105,0,0,250, - 251,5,110,0,0,251,252,5,116,0,0,252,253,5,101,0,0,253,254,5,103, - 0,0,254,255,5,101,0,0,255,256,5,114,0,0,256,18,1,0,0,0,257,258,5, - 114,0,0,258,259,5,101,0,0,259,260,5,97,0,0,260,261,5,108,0,0,261, - 20,1,0,0,0,262,263,5,115,0,0,263,264,5,116,0,0,264,265,5,114,0,0, - 265,266,5,105,0,0,266,267,5,110,0,0,267,268,5,103,0,0,268,22,1,0, - 0,0,269,270,5,98,0,0,270,271,5,111,0,0,271,272,5,111,0,0,272,273, - 5,108,0,0,273,274,5,101,0,0,274,275,5,97,0,0,275,276,5,110,0,0,276, - 24,1,0,0,0,277,278,5,118,0,0,278,279,5,111,0,0,279,280,5,105,0,0, - 280,281,5,100,0,0,281,26,1,0,0,0,282,283,5,102,0,0,283,284,5,117, - 0,0,284,285,5,110,0,0,285,286,5,99,0,0,286,287,5,116,0,0,287,288, - 5,105,0,0,288,289,5,111,0,0,289,290,5,110,0,0,290,28,1,0,0,0,291, - 292,5,105,0,0,292,293,5,110,0,0,293,294,5,108,0,0,294,295,5,105, - 0,0,295,296,5,110,0,0,296,297,5,101,0,0,297,30,1,0,0,0,298,299,5, - 114,0,0,299,300,5,101,0,0,300,301,5,116,0,0,301,302,5,117,0,0,302, - 303,5,114,0,0,303,304,5,110,0,0,304,32,1,0,0,0,305,306,5,105,0,0, - 306,307,5,102,0,0,307,34,1,0,0,0,308,309,5,101,0,0,309,310,5,108, - 0,0,310,311,5,105,0,0,311,312,5,102,0,0,312,36,1,0,0,0,313,314,5, - 101,0,0,314,315,5,108,0,0,315,316,5,115,0,0,316,317,5,101,0,0,317, - 38,1,0,0,0,318,319,5,102,0,0,319,320,5,111,0,0,320,321,5,114,0,0, - 321,40,1,0,0,0,322,323,5,119,0,0,323,324,5,104,0,0,324,325,5,105, - 0,0,325,326,5,108,0,0,326,327,5,101,0,0,327,42,1,0,0,0,328,329,5, - 105,0,0,329,330,5,110,0,0,330,44,1,0,0,0,331,332,5,115,0,0,332,333, - 5,116,0,0,333,334,5,101,0,0,334,335,5,112,0,0,335,46,1,0,0,0,336, - 337,5,105,0,0,337,338,5,110,0,0,338,339,5,102,0,0,339,48,1,0,0,0, - 340,341,5,97,0,0,341,342,5,110,0,0,342,343,5,100,0,0,343,50,1,0, - 0,0,344,345,5,111,0,0,345,346,5,114,0,0,346,52,1,0,0,0,347,348,5, - 110,0,0,348,349,5,111,0,0,349,350,5,116,0,0,350,54,1,0,0,0,351,352, - 5,114,0,0,352,353,5,101,0,0,353,354,5,99,0,0,354,355,5,111,0,0,355, - 356,5,114,0,0,356,357,5,100,0,0,357,358,5,97,0,0,358,359,5,98,0, - 0,359,360,5,108,0,0,360,361,5,101,0,0,361,56,1,0,0,0,362,363,5,107, - 0,0,363,364,5,101,0,0,364,365,5,114,0,0,365,366,5,110,0,0,366,367, - 5,101,0,0,367,368,5,108,0,0,368,58,1,0,0,0,369,370,5,109,0,0,370, - 371,5,111,0,0,371,372,5,100,0,0,372,373,5,101,0,0,373,374,5,108, - 0,0,374,60,1,0,0,0,375,376,5,115,0,0,376,377,5,116,0,0,377,378,5, - 97,0,0,378,379,5,116,0,0,379,380,5,101,0,0,380,62,1,0,0,0,381,382, - 5,112,0,0,382,383,5,97,0,0,383,384,5,114,0,0,384,385,5,97,0,0,385, - 386,5,109,0,0,386,387,5,101,0,0,387,388,5,116,0,0,388,389,5,101, - 0,0,389,390,5,114,0,0,390,391,5,115,0,0,391,64,1,0,0,0,392,393,5, - 105,0,0,393,394,5,110,0,0,394,395,5,116,0,0,395,396,5,101,0,0,396, - 397,5,114,0,0,397,398,5,110,0,0,398,399,5,97,0,0,399,400,5,108,0, - 0,400,401,5,115,0,0,401,66,1,0,0,0,402,403,5,117,0,0,403,404,5,112, - 0,0,404,405,5,100,0,0,405,406,5,97,0,0,406,407,5,116,0,0,407,408, - 5,101,0,0,408,68,1,0,0,0,409,410,5,101,0,0,410,411,5,113,0,0,411, - 412,5,117,0,0,412,413,5,97,0,0,413,414,5,116,0,0,414,415,5,105,0, - 0,415,416,5,111,0,0,416,417,5,110,0,0,417,418,5,115,0,0,418,70,1, - 0,0,0,419,420,5,105,0,0,420,421,5,110,0,0,421,422,5,112,0,0,422, - 423,5,117,0,0,423,424,5,116,0,0,424,72,1,0,0,0,425,426,5,111,0,0, - 426,427,5,117,0,0,427,428,5,116,0,0,428,429,5,112,0,0,429,430,5, - 117,0,0,430,431,5,116,0,0,431,74,1,0,0,0,432,433,5,99,0,0,433,434, - 5,111,0,0,434,435,5,110,0,0,435,436,5,116,0,0,436,437,5,105,0,0, - 437,438,5,110,0,0,438,439,5,117,0,0,439,440,5,111,0,0,440,441,5, - 117,0,0,441,442,5,115,0,0,442,76,1,0,0,0,443,444,5,111,0,0,444,445, - 5,110,0,0,445,446,5,82,0,0,446,447,5,101,0,0,447,448,5,99,0,0,448, - 449,5,101,0,0,449,450,5,105,0,0,450,451,5,118,0,0,451,452,5,101, - 0,0,452,78,1,0,0,0,453,454,5,111,0,0,454,455,5,110,0,0,455,456,5, - 67,0,0,456,457,5,111,0,0,457,458,5,110,0,0,458,459,5,100,0,0,459, - 460,5,105,0,0,460,461,5,116,0,0,461,462,5,105,0,0,462,463,5,111, - 0,0,463,464,5,110,0,0,464,80,1,0,0,0,465,466,5,115,0,0,466,467,5, - 112,0,0,467,468,5,105,0,0,468,469,5,107,0,0,469,470,5,101,0,0,470, - 82,1,0,0,0,471,472,5,105,0,0,472,473,5,110,0,0,473,474,5,104,0,0, - 474,475,5,105,0,0,475,476,5,98,0,0,476,477,5,105,0,0,477,478,5,116, - 0,0,478,479,5,111,0,0,479,480,5,114,0,0,480,481,5,121,0,0,481,84, - 1,0,0,0,482,483,5,101,0,0,483,484,5,120,0,0,484,485,5,99,0,0,485, - 486,5,105,0,0,486,487,5,116,0,0,487,488,5,97,0,0,488,489,5,116,0, - 0,489,490,5,111,0,0,490,491,5,114,0,0,491,492,5,121,0,0,492,86,1, - 0,0,0,493,494,5,64,0,0,494,495,5,104,0,0,495,496,5,111,0,0,496,497, - 5,109,0,0,497,498,5,111,0,0,498,499,5,103,0,0,499,500,5,101,0,0, - 500,501,5,110,0,0,501,502,5,101,0,0,502,503,5,111,0,0,503,504,5, - 117,0,0,504,505,5,115,0,0,505,88,1,0,0,0,506,507,5,64,0,0,507,508, - 5,104,0,0,508,509,5,101,0,0,509,510,5,116,0,0,510,511,5,101,0,0, - 511,512,5,114,0,0,512,513,5,111,0,0,513,514,5,103,0,0,514,515,5, - 101,0,0,515,516,5,110,0,0,516,517,5,101,0,0,517,518,5,111,0,0,518, - 519,5,117,0,0,519,520,5,115,0,0,520,90,1,0,0,0,521,522,5,64,0,0, - 522,92,1,0,0,0,523,524,5,46,0,0,524,525,5,46,0,0,525,526,5,46,0, - 0,526,94,1,0,0,0,527,528,5,40,0,0,528,96,1,0,0,0,529,530,5,41,0, - 0,530,98,1,0,0,0,531,532,5,43,0,0,532,100,1,0,0,0,533,534,5,126, - 0,0,534,102,1,0,0,0,535,536,5,124,0,0,536,104,1,0,0,0,537,538,5, - 94,0,0,538,106,1,0,0,0,539,540,5,38,0,0,540,108,1,0,0,0,541,542, - 5,91,0,0,542,110,1,0,0,0,543,544,5,60,0,0,544,545,5,45,0,0,545,112, - 1,0,0,0,546,547,5,93,0,0,547,114,1,0,0,0,548,549,5,91,0,0,549,550, - 5,91,0,0,550,116,1,0,0,0,551,552,5,93,0,0,552,553,5,93,0,0,553,118, - 1,0,0,0,554,555,5,60,0,0,555,556,5,60,0,0,556,120,1,0,0,0,557,558, - 5,62,0,0,558,559,5,62,0,0,559,122,1,0,0,0,560,561,5,60,0,0,561,124, - 1,0,0,0,562,563,5,62,0,0,563,126,1,0,0,0,564,565,5,60,0,0,565,566, - 5,61,0,0,566,128,1,0,0,0,567,568,5,43,0,0,568,569,5,61,0,0,569,130, - 1,0,0,0,570,571,5,45,0,0,571,572,5,61,0,0,572,132,1,0,0,0,573,574, - 5,42,0,0,574,575,5,61,0,0,575,134,1,0,0,0,576,577,5,47,0,0,577,578, - 5,61,0,0,578,136,1,0,0,0,579,580,5,61,0,0,580,581,5,61,0,0,581,138, - 1,0,0,0,582,583,5,33,0,0,583,584,5,61,0,0,584,140,1,0,0,0,585,586, - 5,60,0,0,586,587,5,62,0,0,587,142,1,0,0,0,588,589,5,62,0,0,589,590, - 5,61,0,0,590,144,1,0,0,0,591,592,5,44,0,0,592,146,1,0,0,0,593,594, - 5,45,0,0,594,148,1,0,0,0,595,596,5,61,0,0,596,150,1,0,0,0,597,598, - 5,42,0,0,598,152,1,0,0,0,599,600,5,42,0,0,600,601,5,42,0,0,601,154, - 1,0,0,0,602,603,5,47,0,0,603,156,1,0,0,0,604,605,5,37,0,0,605,158, - 1,0,0,0,606,607,5,63,0,0,607,160,1,0,0,0,608,609,5,58,0,0,609,162, - 1,0,0,0,610,611,5,58,0,0,611,612,5,58,0,0,612,164,1,0,0,0,613,614, - 5,59,0,0,614,166,1,0,0,0,615,616,5,39,0,0,616,168,1,0,0,0,617,618, - 5,116,0,0,618,619,5,114,0,0,619,620,5,117,0,0,620,636,5,101,0,0, - 621,622,5,84,0,0,622,623,5,114,0,0,623,624,5,117,0,0,624,636,5,101, - 0,0,625,626,5,102,0,0,626,627,5,97,0,0,627,628,5,108,0,0,628,629, - 5,115,0,0,629,636,5,101,0,0,630,631,5,70,0,0,631,632,5,97,0,0,632, - 633,5,108,0,0,633,634,5,115,0,0,634,636,5,101,0,0,635,617,1,0,0, - 0,635,621,1,0,0,0,635,625,1,0,0,0,635,630,1,0,0,0,636,170,1,0,0, - 0,637,656,5,34,0,0,638,651,5,92,0,0,639,641,7,0,0,0,640,639,1,0, - 0,0,641,642,1,0,0,0,642,640,1,0,0,0,642,643,1,0,0,0,643,648,1,0, - 0,0,644,646,5,13,0,0,645,644,1,0,0,0,645,646,1,0,0,0,646,647,1,0, - 0,0,647,649,5,10,0,0,648,645,1,0,0,0,648,649,1,0,0,0,649,652,1,0, - 0,0,650,652,9,0,0,0,651,640,1,0,0,0,651,650,1,0,0,0,652,655,1,0, - 0,0,653,655,8,2,0,0,654,638,1,0,0,0,654,653,1,0,0,0,655,658,1,0, - 0,0,656,654,1,0,0,0,656,657,1,0,0,0,657,659,1,0,0,0,658,656,1,0, - 0,0,659,660,5,34,0,0,660,172,1,0,0,0,661,663,7,3,0,0,662,661,1,0, - 0,0,663,667,1,0,0,0,664,666,7,4,0,0,665,664,1,0,0,0,666,669,1,0, - 0,0,667,665,1,0,0,0,667,668,1,0,0,0,668,174,1,0,0,0,669,667,1,0, - 0,0,670,672,7,5,0,0,671,670,1,0,0,0,672,673,1,0,0,0,673,671,1,0, - 0,0,673,674,1,0,0,0,674,176,1,0,0,0,675,678,3,179,89,0,676,678,3, - 181,90,0,677,675,1,0,0,0,677,676,1,0,0,0,678,178,1,0,0,0,679,681, - 3,175,87,0,680,679,1,0,0,0,680,681,1,0,0,0,681,682,1,0,0,0,682,683, - 5,46,0,0,683,688,3,175,87,0,684,685,3,175,87,0,685,686,5,46,0,0, - 686,688,1,0,0,0,687,680,1,0,0,0,687,684,1,0,0,0,688,180,1,0,0,0, - 689,692,3,175,87,0,690,692,3,179,89,0,691,689,1,0,0,0,691,690,1, - 0,0,0,692,693,1,0,0,0,693,694,7,6,0,0,694,695,3,183,91,0,695,182, - 1,0,0,0,696,699,3,99,49,0,697,699,3,147,73,0,698,696,1,0,0,0,698, - 697,1,0,0,0,698,699,1,0,0,0,699,700,1,0,0,0,700,701,3,175,87,0,701, - 184,1,0,0,0,26,0,190,197,202,215,222,230,238,243,245,635,642,645, - 648,651,654,656,662,665,667,673,677,680,687,691,698,3,0,1,0,0,2, - 0,1,7,0 + 91,7,91,2,92,7,92,1,0,1,0,1,0,1,0,1,1,3,1,193,8,1,1,1,1,1,1,2,1, + 2,1,2,3,2,200,8,2,1,3,4,3,203,8,3,11,3,12,3,204,1,3,1,3,1,4,1,4, + 1,4,1,4,1,4,1,5,1,5,5,5,216,8,5,10,5,12,5,219,9,5,1,5,1,5,4,5,223, + 8,5,11,5,12,5,224,1,5,1,5,1,6,1,6,5,6,231,8,6,10,6,12,6,234,9,6, + 1,6,1,6,1,7,1,7,1,7,3,7,241,8,7,1,7,1,7,1,7,3,7,246,8,7,3,7,248, + 8,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9, + 1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11, + 1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13, + 1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15, + 1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,18, + 1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20, + 1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23, + 1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,27,1,27, + 1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28, + 1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30, + 1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31, + 1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33, + 1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34, + 1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36, + 1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,38, + 1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39, + 1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40, + 1,40,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,42, + 1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43, + 1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44, + 1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,45, + 1,45,1,46,1,46,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,50,1,50, + 1,51,1,51,1,52,1,52,1,53,1,53,1,54,1,54,1,55,1,55,1,55,1,56,1,56, + 1,57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,59,1,60,1,60,1,60,1,61, + 1,61,1,62,1,62,1,63,1,63,1,63,1,64,1,64,1,64,1,65,1,65,1,65,1,66, + 1,66,1,66,1,67,1,67,1,67,1,68,1,68,1,68,1,69,1,69,1,69,1,70,1,70, + 1,70,1,71,1,71,1,71,1,72,1,72,1,73,1,73,1,74,1,74,1,75,1,75,1,76, + 1,76,1,76,1,77,1,77,1,78,1,78,1,79,1,79,1,80,1,80,1,81,1,81,1,81, + 1,82,1,82,1,83,1,83,1,84,1,84,1,85,1,85,1,85,1,85,1,85,1,85,1,85, + 1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,3,85,640, + 8,85,1,86,1,86,1,86,4,86,645,8,86,11,86,12,86,646,1,86,3,86,650, + 8,86,1,86,3,86,653,8,86,1,86,3,86,656,8,86,1,86,5,86,659,8,86,10, + 86,12,86,662,9,86,1,86,1,86,1,87,3,87,667,8,87,1,87,5,87,670,8,87, + 10,87,12,87,673,9,87,1,88,4,88,676,8,88,11,88,12,88,677,1,89,1,89, + 3,89,682,8,89,1,90,3,90,685,8,90,1,90,1,90,1,90,1,90,1,90,1,90,3, + 90,693,8,90,1,91,1,91,3,91,697,8,91,1,91,1,91,1,91,1,92,1,92,3,92, + 704,8,92,1,92,1,92,2,217,224,0,93,1,3,3,0,5,4,7,5,9,6,11,7,13,8, + 15,9,17,10,19,11,21,12,23,13,25,14,27,15,29,16,31,17,33,18,35,19, + 37,20,39,21,41,22,43,23,45,24,47,25,49,26,51,27,53,28,55,29,57,30, + 59,31,61,32,63,33,65,34,67,35,69,36,71,37,73,38,75,39,77,40,79,41, + 81,42,83,43,85,44,87,45,89,46,91,47,93,48,95,49,97,50,99,51,101, + 52,103,53,105,54,107,55,109,56,111,57,113,58,115,59,117,60,119,61, + 121,62,123,63,125,64,127,65,129,66,131,67,133,68,135,69,137,70,139, + 71,141,72,143,73,145,74,147,75,149,76,151,77,153,78,155,79,157,80, + 159,81,161,82,163,83,165,84,167,85,169,86,171,87,173,88,175,89,177, + 90,179,91,181,0,183,0,185,0,1,0,7,2,0,9,9,32,32,2,0,10,10,13,13, + 4,0,10,10,13,13,34,34,92,92,4,0,36,36,65,90,95,95,97,122,5,0,36, + 36,48,57,65,90,95,95,97,122,1,0,48,57,2,0,69,69,101,101,728,0,1, + 1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1, + 0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1, + 0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1, + 0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1, + 0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1, + 0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1, + 0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1, + 0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1, + 0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1, + 0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103, + 1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0, + 0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1, + 0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0, + 131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0, + 0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149, + 1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0, + 0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1, + 0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0, + 177,1,0,0,0,0,179,1,0,0,0,1,187,1,0,0,0,3,192,1,0,0,0,5,196,1,0, + 0,0,7,202,1,0,0,0,9,208,1,0,0,0,11,213,1,0,0,0,13,228,1,0,0,0,15, + 247,1,0,0,0,17,251,1,0,0,0,19,259,1,0,0,0,21,264,1,0,0,0,23,271, + 1,0,0,0,25,279,1,0,0,0,27,284,1,0,0,0,29,293,1,0,0,0,31,300,1,0, + 0,0,33,307,1,0,0,0,35,310,1,0,0,0,37,315,1,0,0,0,39,320,1,0,0,0, + 41,324,1,0,0,0,43,330,1,0,0,0,45,333,1,0,0,0,47,338,1,0,0,0,49,342, + 1,0,0,0,51,346,1,0,0,0,53,349,1,0,0,0,55,353,1,0,0,0,57,364,1,0, + 0,0,59,371,1,0,0,0,61,377,1,0,0,0,63,383,1,0,0,0,65,394,1,0,0,0, + 67,404,1,0,0,0,69,411,1,0,0,0,71,421,1,0,0,0,73,427,1,0,0,0,75,434, + 1,0,0,0,77,445,1,0,0,0,79,455,1,0,0,0,81,467,1,0,0,0,83,473,1,0, + 0,0,85,484,1,0,0,0,87,495,1,0,0,0,89,508,1,0,0,0,91,523,1,0,0,0, + 93,525,1,0,0,0,95,529,1,0,0,0,97,531,1,0,0,0,99,533,1,0,0,0,101, + 535,1,0,0,0,103,537,1,0,0,0,105,539,1,0,0,0,107,541,1,0,0,0,109, + 543,1,0,0,0,111,545,1,0,0,0,113,548,1,0,0,0,115,550,1,0,0,0,117, + 553,1,0,0,0,119,556,1,0,0,0,121,559,1,0,0,0,123,562,1,0,0,0,125, + 564,1,0,0,0,127,566,1,0,0,0,129,569,1,0,0,0,131,572,1,0,0,0,133, + 575,1,0,0,0,135,578,1,0,0,0,137,581,1,0,0,0,139,584,1,0,0,0,141, + 587,1,0,0,0,143,590,1,0,0,0,145,593,1,0,0,0,147,595,1,0,0,0,149, + 597,1,0,0,0,151,599,1,0,0,0,153,601,1,0,0,0,155,604,1,0,0,0,157, + 606,1,0,0,0,159,608,1,0,0,0,161,610,1,0,0,0,163,612,1,0,0,0,165, + 615,1,0,0,0,167,617,1,0,0,0,169,619,1,0,0,0,171,639,1,0,0,0,173, + 641,1,0,0,0,175,666,1,0,0,0,177,675,1,0,0,0,179,681,1,0,0,0,181, + 692,1,0,0,0,183,696,1,0,0,0,185,703,1,0,0,0,187,188,5,34,0,0,188, + 189,5,34,0,0,189,190,5,34,0,0,190,2,1,0,0,0,191,193,5,13,0,0,192, + 191,1,0,0,0,192,193,1,0,0,0,193,194,1,0,0,0,194,195,5,10,0,0,195, + 4,1,0,0,0,196,197,3,145,72,0,197,199,3,3,1,0,198,200,3,7,3,0,199, + 198,1,0,0,0,199,200,1,0,0,0,200,6,1,0,0,0,201,203,7,0,0,0,202,201, + 1,0,0,0,203,204,1,0,0,0,204,202,1,0,0,0,204,205,1,0,0,0,205,206, + 1,0,0,0,206,207,6,3,0,0,207,8,1,0,0,0,208,209,5,92,0,0,209,210,3, + 3,1,0,210,211,1,0,0,0,211,212,6,4,0,0,212,10,1,0,0,0,213,217,3,1, + 0,0,214,216,9,0,0,0,215,214,1,0,0,0,216,219,1,0,0,0,217,218,1,0, + 0,0,217,215,1,0,0,0,218,220,1,0,0,0,219,217,1,0,0,0,220,222,3,1, + 0,0,221,223,3,3,1,0,222,221,1,0,0,0,223,224,1,0,0,0,224,225,1,0, + 0,0,224,222,1,0,0,0,225,226,1,0,0,0,226,227,6,5,1,0,227,12,1,0,0, + 0,228,232,5,35,0,0,229,231,8,1,0,0,230,229,1,0,0,0,231,234,1,0,0, + 0,232,230,1,0,0,0,232,233,1,0,0,0,233,235,1,0,0,0,234,232,1,0,0, + 0,235,236,6,6,1,0,236,14,1,0,0,0,237,238,4,7,0,0,238,248,3,7,3,0, + 239,241,5,13,0,0,240,239,1,0,0,0,240,241,1,0,0,0,241,242,1,0,0,0, + 242,243,5,10,0,0,243,245,1,0,0,0,244,246,3,7,3,0,245,244,1,0,0,0, + 245,246,1,0,0,0,246,248,1,0,0,0,247,237,1,0,0,0,247,240,1,0,0,0, + 248,249,1,0,0,0,249,250,6,7,2,0,250,16,1,0,0,0,251,252,5,105,0,0, + 252,253,5,110,0,0,253,254,5,116,0,0,254,255,5,101,0,0,255,256,5, + 103,0,0,256,257,5,101,0,0,257,258,5,114,0,0,258,18,1,0,0,0,259,260, + 5,114,0,0,260,261,5,101,0,0,261,262,5,97,0,0,262,263,5,108,0,0,263, + 20,1,0,0,0,264,265,5,115,0,0,265,266,5,116,0,0,266,267,5,114,0,0, + 267,268,5,105,0,0,268,269,5,110,0,0,269,270,5,103,0,0,270,22,1,0, + 0,0,271,272,5,98,0,0,272,273,5,111,0,0,273,274,5,111,0,0,274,275, + 5,108,0,0,275,276,5,101,0,0,276,277,5,97,0,0,277,278,5,110,0,0,278, + 24,1,0,0,0,279,280,5,118,0,0,280,281,5,111,0,0,281,282,5,105,0,0, + 282,283,5,100,0,0,283,26,1,0,0,0,284,285,5,102,0,0,285,286,5,117, + 0,0,286,287,5,110,0,0,287,288,5,99,0,0,288,289,5,116,0,0,289,290, + 5,105,0,0,290,291,5,111,0,0,291,292,5,110,0,0,292,28,1,0,0,0,293, + 294,5,105,0,0,294,295,5,110,0,0,295,296,5,108,0,0,296,297,5,105, + 0,0,297,298,5,110,0,0,298,299,5,101,0,0,299,30,1,0,0,0,300,301,5, + 114,0,0,301,302,5,101,0,0,302,303,5,116,0,0,303,304,5,117,0,0,304, + 305,5,114,0,0,305,306,5,110,0,0,306,32,1,0,0,0,307,308,5,105,0,0, + 308,309,5,102,0,0,309,34,1,0,0,0,310,311,5,101,0,0,311,312,5,108, + 0,0,312,313,5,105,0,0,313,314,5,102,0,0,314,36,1,0,0,0,315,316,5, + 101,0,0,316,317,5,108,0,0,317,318,5,115,0,0,318,319,5,101,0,0,319, + 38,1,0,0,0,320,321,5,102,0,0,321,322,5,111,0,0,322,323,5,114,0,0, + 323,40,1,0,0,0,324,325,5,119,0,0,325,326,5,104,0,0,326,327,5,105, + 0,0,327,328,5,108,0,0,328,329,5,101,0,0,329,42,1,0,0,0,330,331,5, + 105,0,0,331,332,5,110,0,0,332,44,1,0,0,0,333,334,5,115,0,0,334,335, + 5,116,0,0,335,336,5,101,0,0,336,337,5,112,0,0,337,46,1,0,0,0,338, + 339,5,105,0,0,339,340,5,110,0,0,340,341,5,102,0,0,341,48,1,0,0,0, + 342,343,5,97,0,0,343,344,5,110,0,0,344,345,5,100,0,0,345,50,1,0, + 0,0,346,347,5,111,0,0,347,348,5,114,0,0,348,52,1,0,0,0,349,350,5, + 110,0,0,350,351,5,111,0,0,351,352,5,116,0,0,352,54,1,0,0,0,353,354, + 5,114,0,0,354,355,5,101,0,0,355,356,5,99,0,0,356,357,5,111,0,0,357, + 358,5,114,0,0,358,359,5,100,0,0,359,360,5,97,0,0,360,361,5,98,0, + 0,361,362,5,108,0,0,362,363,5,101,0,0,363,56,1,0,0,0,364,365,5,107, + 0,0,365,366,5,101,0,0,366,367,5,114,0,0,367,368,5,110,0,0,368,369, + 5,101,0,0,369,370,5,108,0,0,370,58,1,0,0,0,371,372,5,109,0,0,372, + 373,5,111,0,0,373,374,5,100,0,0,374,375,5,101,0,0,375,376,5,108, + 0,0,376,60,1,0,0,0,377,378,5,115,0,0,378,379,5,116,0,0,379,380,5, + 97,0,0,380,381,5,116,0,0,381,382,5,101,0,0,382,62,1,0,0,0,383,384, + 5,112,0,0,384,385,5,97,0,0,385,386,5,114,0,0,386,387,5,97,0,0,387, + 388,5,109,0,0,388,389,5,101,0,0,389,390,5,116,0,0,390,391,5,101, + 0,0,391,392,5,114,0,0,392,393,5,115,0,0,393,64,1,0,0,0,394,395,5, + 105,0,0,395,396,5,110,0,0,396,397,5,116,0,0,397,398,5,101,0,0,398, + 399,5,114,0,0,399,400,5,110,0,0,400,401,5,97,0,0,401,402,5,108,0, + 0,402,403,5,115,0,0,403,66,1,0,0,0,404,405,5,117,0,0,405,406,5,112, + 0,0,406,407,5,100,0,0,407,408,5,97,0,0,408,409,5,116,0,0,409,410, + 5,101,0,0,410,68,1,0,0,0,411,412,5,101,0,0,412,413,5,113,0,0,413, + 414,5,117,0,0,414,415,5,97,0,0,415,416,5,116,0,0,416,417,5,105,0, + 0,417,418,5,111,0,0,418,419,5,110,0,0,419,420,5,115,0,0,420,70,1, + 0,0,0,421,422,5,105,0,0,422,423,5,110,0,0,423,424,5,112,0,0,424, + 425,5,117,0,0,425,426,5,116,0,0,426,72,1,0,0,0,427,428,5,111,0,0, + 428,429,5,117,0,0,429,430,5,116,0,0,430,431,5,112,0,0,431,432,5, + 117,0,0,432,433,5,116,0,0,433,74,1,0,0,0,434,435,5,99,0,0,435,436, + 5,111,0,0,436,437,5,110,0,0,437,438,5,116,0,0,438,439,5,105,0,0, + 439,440,5,110,0,0,440,441,5,117,0,0,441,442,5,111,0,0,442,443,5, + 117,0,0,443,444,5,115,0,0,444,76,1,0,0,0,445,446,5,111,0,0,446,447, + 5,110,0,0,447,448,5,82,0,0,448,449,5,101,0,0,449,450,5,99,0,0,450, + 451,5,101,0,0,451,452,5,105,0,0,452,453,5,118,0,0,453,454,5,101, + 0,0,454,78,1,0,0,0,455,456,5,111,0,0,456,457,5,110,0,0,457,458,5, + 67,0,0,458,459,5,111,0,0,459,460,5,110,0,0,460,461,5,100,0,0,461, + 462,5,105,0,0,462,463,5,116,0,0,463,464,5,105,0,0,464,465,5,111, + 0,0,465,466,5,110,0,0,466,80,1,0,0,0,467,468,5,115,0,0,468,469,5, + 112,0,0,469,470,5,105,0,0,470,471,5,107,0,0,471,472,5,101,0,0,472, + 82,1,0,0,0,473,474,5,105,0,0,474,475,5,110,0,0,475,476,5,104,0,0, + 476,477,5,105,0,0,477,478,5,98,0,0,478,479,5,105,0,0,479,480,5,116, + 0,0,480,481,5,111,0,0,481,482,5,114,0,0,482,483,5,121,0,0,483,84, + 1,0,0,0,484,485,5,101,0,0,485,486,5,120,0,0,486,487,5,99,0,0,487, + 488,5,105,0,0,488,489,5,116,0,0,489,490,5,97,0,0,490,491,5,116,0, + 0,491,492,5,111,0,0,492,493,5,114,0,0,493,494,5,121,0,0,494,86,1, + 0,0,0,495,496,5,64,0,0,496,497,5,104,0,0,497,498,5,111,0,0,498,499, + 5,109,0,0,499,500,5,111,0,0,500,501,5,103,0,0,501,502,5,101,0,0, + 502,503,5,110,0,0,503,504,5,101,0,0,504,505,5,111,0,0,505,506,5, + 117,0,0,506,507,5,115,0,0,507,88,1,0,0,0,508,509,5,64,0,0,509,510, + 5,104,0,0,510,511,5,101,0,0,511,512,5,116,0,0,512,513,5,101,0,0, + 513,514,5,114,0,0,514,515,5,111,0,0,515,516,5,103,0,0,516,517,5, + 101,0,0,517,518,5,110,0,0,518,519,5,101,0,0,519,520,5,111,0,0,520, + 521,5,117,0,0,521,522,5,115,0,0,522,90,1,0,0,0,523,524,5,64,0,0, + 524,92,1,0,0,0,525,526,5,46,0,0,526,527,5,46,0,0,527,528,5,46,0, + 0,528,94,1,0,0,0,529,530,5,40,0,0,530,96,1,0,0,0,531,532,5,41,0, + 0,532,98,1,0,0,0,533,534,5,43,0,0,534,100,1,0,0,0,535,536,5,126, + 0,0,536,102,1,0,0,0,537,538,5,124,0,0,538,104,1,0,0,0,539,540,5, + 94,0,0,540,106,1,0,0,0,541,542,5,38,0,0,542,108,1,0,0,0,543,544, + 5,91,0,0,544,110,1,0,0,0,545,546,5,60,0,0,546,547,5,45,0,0,547,112, + 1,0,0,0,548,549,5,93,0,0,549,114,1,0,0,0,550,551,5,91,0,0,551,552, + 5,91,0,0,552,116,1,0,0,0,553,554,5,93,0,0,554,555,5,93,0,0,555,118, + 1,0,0,0,556,557,5,60,0,0,557,558,5,60,0,0,558,120,1,0,0,0,559,560, + 5,62,0,0,560,561,5,62,0,0,561,122,1,0,0,0,562,563,5,60,0,0,563,124, + 1,0,0,0,564,565,5,62,0,0,565,126,1,0,0,0,566,567,5,60,0,0,567,568, + 5,61,0,0,568,128,1,0,0,0,569,570,5,43,0,0,570,571,5,61,0,0,571,130, + 1,0,0,0,572,573,5,45,0,0,573,574,5,61,0,0,574,132,1,0,0,0,575,576, + 5,42,0,0,576,577,5,61,0,0,577,134,1,0,0,0,578,579,5,47,0,0,579,580, + 5,61,0,0,580,136,1,0,0,0,581,582,5,61,0,0,582,583,5,61,0,0,583,138, + 1,0,0,0,584,585,5,33,0,0,585,586,5,61,0,0,586,140,1,0,0,0,587,588, + 5,60,0,0,588,589,5,62,0,0,589,142,1,0,0,0,590,591,5,62,0,0,591,592, + 5,61,0,0,592,144,1,0,0,0,593,594,5,44,0,0,594,146,1,0,0,0,595,596, + 5,45,0,0,596,148,1,0,0,0,597,598,5,61,0,0,598,150,1,0,0,0,599,600, + 5,42,0,0,600,152,1,0,0,0,601,602,5,42,0,0,602,603,5,42,0,0,603,154, + 1,0,0,0,604,605,5,47,0,0,605,156,1,0,0,0,606,607,5,37,0,0,607,158, + 1,0,0,0,608,609,5,63,0,0,609,160,1,0,0,0,610,611,5,58,0,0,611,162, + 1,0,0,0,612,613,5,58,0,0,613,614,5,58,0,0,614,164,1,0,0,0,615,616, + 5,59,0,0,616,166,1,0,0,0,617,618,5,39,0,0,618,168,1,0,0,0,619,620, + 5,46,0,0,620,170,1,0,0,0,621,622,5,116,0,0,622,623,5,114,0,0,623, + 624,5,117,0,0,624,640,5,101,0,0,625,626,5,84,0,0,626,627,5,114,0, + 0,627,628,5,117,0,0,628,640,5,101,0,0,629,630,5,102,0,0,630,631, + 5,97,0,0,631,632,5,108,0,0,632,633,5,115,0,0,633,640,5,101,0,0,634, + 635,5,70,0,0,635,636,5,97,0,0,636,637,5,108,0,0,637,638,5,115,0, + 0,638,640,5,101,0,0,639,621,1,0,0,0,639,625,1,0,0,0,639,629,1,0, + 0,0,639,634,1,0,0,0,640,172,1,0,0,0,641,660,5,34,0,0,642,655,5,92, + 0,0,643,645,7,0,0,0,644,643,1,0,0,0,645,646,1,0,0,0,646,644,1,0, + 0,0,646,647,1,0,0,0,647,652,1,0,0,0,648,650,5,13,0,0,649,648,1,0, + 0,0,649,650,1,0,0,0,650,651,1,0,0,0,651,653,5,10,0,0,652,649,1,0, + 0,0,652,653,1,0,0,0,653,656,1,0,0,0,654,656,9,0,0,0,655,644,1,0, + 0,0,655,654,1,0,0,0,656,659,1,0,0,0,657,659,8,2,0,0,658,642,1,0, + 0,0,658,657,1,0,0,0,659,662,1,0,0,0,660,658,1,0,0,0,660,661,1,0, + 0,0,661,663,1,0,0,0,662,660,1,0,0,0,663,664,5,34,0,0,664,174,1,0, + 0,0,665,667,7,3,0,0,666,665,1,0,0,0,667,671,1,0,0,0,668,670,7,4, + 0,0,669,668,1,0,0,0,670,673,1,0,0,0,671,669,1,0,0,0,671,672,1,0, + 0,0,672,176,1,0,0,0,673,671,1,0,0,0,674,676,7,5,0,0,675,674,1,0, + 0,0,676,677,1,0,0,0,677,675,1,0,0,0,677,678,1,0,0,0,678,178,1,0, + 0,0,679,682,3,181,90,0,680,682,3,183,91,0,681,679,1,0,0,0,681,680, + 1,0,0,0,682,180,1,0,0,0,683,685,3,177,88,0,684,683,1,0,0,0,684,685, + 1,0,0,0,685,686,1,0,0,0,686,687,3,169,84,0,687,688,3,177,88,0,688, + 693,1,0,0,0,689,690,3,177,88,0,690,691,3,169,84,0,691,693,1,0,0, + 0,692,684,1,0,0,0,692,689,1,0,0,0,693,182,1,0,0,0,694,697,3,177, + 88,0,695,697,3,181,90,0,696,694,1,0,0,0,696,695,1,0,0,0,697,698, + 1,0,0,0,698,699,7,6,0,0,699,700,3,185,92,0,700,184,1,0,0,0,701,704, + 3,99,49,0,702,704,3,147,73,0,703,701,1,0,0,0,703,702,1,0,0,0,703, + 704,1,0,0,0,704,705,1,0,0,0,705,706,3,177,88,0,706,186,1,0,0,0,26, + 0,192,199,204,217,224,232,240,245,247,639,646,649,652,655,658,660, + 666,669,671,677,681,684,692,696,703,3,0,1,0,0,2,0,1,7,0 ] class PyNestMLLexer(PyNestMLLexerBase): @@ -361,11 +362,12 @@ class PyNestMLLexer(PyNestMLLexerBase): DOUBLE_COLON = 83 SEMICOLON = 84 DIFFERENTIAL_ORDER = 85 - BOOLEAN_LITERAL = 86 - STRING_LITERAL = 87 - NAME = 88 - UNSIGNED_INTEGER = 89 - FLOAT = 90 + FULLSTOP = 86 + BOOLEAN_LITERAL = 87 + STRING_LITERAL = 88 + NAME = 89 + UNSIGNED_INTEGER = 90 + FLOAT = 91 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN", u"COMMENT" ] @@ -383,7 +385,7 @@ class PyNestMLLexer(PyNestMLLexerBase): "'|'", "'^'", "'&'", "'['", "'<-'", "']'", "'[['", "']]'", "'<<'", "'>>'", "'<'", "'>'", "'<='", "'+='", "'-='", "'*='", "'/='", "'=='", "'!='", "'<>'", "'>='", "','", "'-'", "'='", "'*'", - "'**'", "'/'", "'%'", "'?'", "':'", "'::'", "';'", "'''" ] + "'**'", "'/'", "'%'", "'?'", "':'", "'::'", "';'", "'''", "'.'" ] symbolicNames = [ "", "INDENT", "DEDENT", "DOCSTRING_TRIPLEQUOTE", "KERNEL_JOINING", @@ -406,8 +408,8 @@ class PyNestMLLexer(PyNestMLLexerBase): "EQUALS_EQUALS", "EXCLAMATION_EQUALS", "LEFT_ANGLE_RIGHT_ANGLE", "RIGHT_ANGLE_EQUALS", "COMMA", "MINUS", "EQUALS", "STAR", "STAR_STAR", "FORWARD_SLASH", "PERCENT", "QUESTION", "COLON", "DOUBLE_COLON", - "SEMICOLON", "DIFFERENTIAL_ORDER", "BOOLEAN_LITERAL", "STRING_LITERAL", - "NAME", "UNSIGNED_INTEGER", "FLOAT" ] + "SEMICOLON", "DIFFERENTIAL_ORDER", "FULLSTOP", "BOOLEAN_LITERAL", + "STRING_LITERAL", "NAME", "UNSIGNED_INTEGER", "FLOAT" ] ruleNames = [ "DOCSTRING_TRIPLEQUOTE", "NEWLINE_FRAG", "KERNEL_JOINING", "WS", "LINE_ESCAPE", "DOCSTRING", "SL_COMMENT", "NEWLINE", @@ -431,15 +433,15 @@ class PyNestMLLexer(PyNestMLLexerBase): "EQUALS_EQUALS", "EXCLAMATION_EQUALS", "LEFT_ANGLE_RIGHT_ANGLE", "RIGHT_ANGLE_EQUALS", "COMMA", "MINUS", "EQUALS", "STAR", "STAR_STAR", "FORWARD_SLASH", "PERCENT", "QUESTION", "COLON", - "DOUBLE_COLON", "SEMICOLON", "DIFFERENTIAL_ORDER", "BOOLEAN_LITERAL", - "STRING_LITERAL", "NAME", "UNSIGNED_INTEGER", "FLOAT", - "POINT_FLOAT", "EXPONENT_FLOAT", "EXPONENT" ] + "DOUBLE_COLON", "SEMICOLON", "DIFFERENTIAL_ORDER", "FULLSTOP", + "BOOLEAN_LITERAL", "STRING_LITERAL", "NAME", "UNSIGNED_INTEGER", + "FLOAT", "POINT_FLOAT", "EXPONENT_FLOAT", "EXPONENT" ] grammarFileName = "PyNestMLLexer.g4" def __init__(self, input=None, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.13.1") + self.checkVersion("4.10.1") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None diff --git a/pynestml/generated/PyNestMLParser.py b/pynestml/generated/PyNestMLParser.py index ecb08158a..ccb7bfe00 100644 --- a/pynestml/generated/PyNestMLParser.py +++ b/pynestml/generated/PyNestMLParser.py @@ -1,4 +1,4 @@ -# Generated from PyNestMLParser.g4 by ANTLR 4.13.1 +# Generated from PyNestMLParser.g4 by ANTLR 4.10.1 # encoding: utf-8 from antlr4 import * from io import StringIO @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,1,90,598,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,1,91,632,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, 2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20, 7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26, @@ -27,209 +27,223 @@ def serializedATN(): 1,4,3,4,194,8,4,1,5,1,5,1,5,3,5,199,8,5,1,6,1,6,1,6,1,6,1,6,3,6, 206,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,215,8,7,1,8,1,8,3,8,219, 8,8,1,9,1,9,1,9,1,9,1,9,3,9,226,8,9,1,9,5,9,229,8,9,10,9,12,9,232, - 9,9,1,10,1,10,1,10,1,10,1,10,5,10,239,8,10,10,10,12,10,242,9,10, - 3,10,244,8,10,1,10,1,10,1,11,3,11,249,8,11,1,11,1,11,1,11,1,11,1, - 11,1,11,3,11,257,8,11,1,11,5,11,260,8,11,10,11,12,11,263,9,11,1, - 11,1,11,1,12,1,12,1,12,1,12,3,12,271,8,12,1,12,5,12,274,8,12,10, - 12,12,12,277,9,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, - 13,1,13,5,13,290,8,13,10,13,12,13,293,9,13,1,13,3,13,296,8,13,1, - 13,1,13,1,14,1,14,1,14,4,14,303,8,14,11,14,12,14,304,1,14,1,14,1, - 15,1,15,3,15,311,8,15,1,16,1,16,1,16,3,16,316,8,16,1,17,1,17,1,17, - 1,17,3,17,322,8,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,3,18, - 332,8,18,1,18,1,18,1,19,3,19,337,8,19,1,19,3,19,340,8,19,1,19,1, - 19,1,19,5,19,345,8,19,10,19,12,19,348,9,19,1,19,1,19,1,19,3,19,353, - 8,19,1,19,1,19,1,19,1,19,3,19,359,8,19,1,19,5,19,362,8,19,10,19, - 12,19,365,9,19,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21, - 3,21,377,8,21,1,22,1,22,1,23,1,23,1,24,1,24,3,24,385,8,24,1,25,1, - 25,5,25,389,8,25,10,25,12,25,392,9,25,1,25,3,25,395,8,25,1,26,1, - 26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,419,8,29,1,29,1,29,1, - 29,1,29,1,30,1,30,1,30,1,30,1,30,1,31,1,31,4,31,432,8,31,11,31,12, - 31,433,1,31,1,31,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1, - 33,1,33,1,33,1,33,1,33,1,33,4,33,453,8,33,11,33,12,33,454,1,33,1, - 33,1,34,1,34,1,34,1,34,1,34,5,34,464,8,34,10,34,12,34,467,9,34,1, - 34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,5,35,478,8,35,10,35,12, - 35,481,9,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,4,36,492, - 8,36,11,36,12,36,493,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,38, - 1,38,1,38,1,38,1,38,4,38,509,8,38,11,38,12,38,510,1,38,1,38,1,39, - 1,39,1,39,1,39,1,39,1,39,4,39,521,8,39,11,39,12,39,522,1,39,1,39, - 1,40,1,40,1,40,1,40,1,40,3,40,532,8,40,1,40,1,40,5,40,536,8,40,10, - 40,12,40,539,9,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,3,41,549, - 8,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,3,42,558,8,42,1,43,1,43, - 1,43,1,43,1,43,1,43,3,43,566,8,43,1,43,1,43,1,43,1,44,1,44,1,44, - 1,44,1,44,1,44,5,44,577,8,44,10,44,12,44,580,9,44,3,44,582,8,44, - 1,44,1,44,3,44,586,8,44,1,44,1,44,1,44,1,45,1,45,1,45,1,46,1,46, - 1,46,1,46,1,46,0,2,2,6,47,0,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,56,58,60,62,64,66,68,70,72, - 74,76,78,80,82,84,86,88,90,92,0,4,2,0,51,51,75,75,1,0,89,90,1,0, - 32,34,3,0,25,25,86,87,89,90,653,0,100,1,0,0,0,2,111,1,0,0,0,4,128, - 1,0,0,0,6,143,1,0,0,0,8,193,1,0,0,0,10,198,1,0,0,0,12,205,1,0,0, - 0,14,214,1,0,0,0,16,218,1,0,0,0,18,220,1,0,0,0,20,233,1,0,0,0,22, - 248,1,0,0,0,24,266,1,0,0,0,26,280,1,0,0,0,28,299,1,0,0,0,30,310, - 1,0,0,0,32,315,1,0,0,0,34,321,1,0,0,0,36,325,1,0,0,0,38,336,1,0, - 0,0,40,366,1,0,0,0,42,376,1,0,0,0,44,378,1,0,0,0,46,380,1,0,0,0, - 48,382,1,0,0,0,50,386,1,0,0,0,52,396,1,0,0,0,54,401,1,0,0,0,56,406, - 1,0,0,0,58,410,1,0,0,0,60,424,1,0,0,0,62,431,1,0,0,0,64,437,1,0, - 0,0,66,441,1,0,0,0,68,458,1,0,0,0,70,472,1,0,0,0,72,486,1,0,0,0, - 74,497,1,0,0,0,76,501,1,0,0,0,78,514,1,0,0,0,80,526,1,0,0,0,82,543, - 1,0,0,0,84,557,1,0,0,0,86,559,1,0,0,0,88,570,1,0,0,0,90,590,1,0, - 0,0,92,593,1,0,0,0,94,101,5,10,0,0,95,101,5,11,0,0,96,101,5,12,0, - 0,97,101,5,13,0,0,98,101,5,14,0,0,99,101,3,2,1,0,100,94,1,0,0,0, - 100,95,1,0,0,0,100,96,1,0,0,0,100,97,1,0,0,0,100,98,1,0,0,0,100, - 99,1,0,0,0,101,1,1,0,0,0,102,103,6,1,-1,0,103,104,5,49,0,0,104,105, - 3,2,1,0,105,106,5,50,0,0,106,112,1,0,0,0,107,108,5,89,0,0,108,109, - 5,79,0,0,109,112,3,2,1,2,110,112,5,88,0,0,111,102,1,0,0,0,111,107, - 1,0,0,0,111,110,1,0,0,0,112,124,1,0,0,0,113,116,10,3,0,0,114,117, - 5,77,0,0,115,117,5,79,0,0,116,114,1,0,0,0,116,115,1,0,0,0,117,118, - 1,0,0,0,118,123,3,2,1,4,119,120,10,4,0,0,120,121,5,78,0,0,121,123, - 3,4,2,0,122,113,1,0,0,0,122,119,1,0,0,0,123,126,1,0,0,0,124,122, - 1,0,0,0,124,125,1,0,0,0,125,3,1,0,0,0,126,124,1,0,0,0,127,129,7, - 0,0,0,128,127,1,0,0,0,128,129,1,0,0,0,129,130,1,0,0,0,130,131,5, - 89,0,0,131,5,1,0,0,0,132,133,6,3,-1,0,133,134,5,49,0,0,134,135,3, - 6,3,0,135,136,5,50,0,0,136,144,1,0,0,0,137,138,3,10,5,0,138,139, - 3,6,3,9,139,144,1,0,0,0,140,141,5,28,0,0,141,144,3,6,3,4,142,144, - 3,8,4,0,143,132,1,0,0,0,143,137,1,0,0,0,143,140,1,0,0,0,143,142, - 1,0,0,0,144,181,1,0,0,0,145,146,10,10,0,0,146,147,5,78,0,0,147,180, - 3,6,3,10,148,152,10,8,0,0,149,153,5,77,0,0,150,153,5,79,0,0,151, - 153,5,80,0,0,152,149,1,0,0,0,152,150,1,0,0,0,152,151,1,0,0,0,153, - 154,1,0,0,0,154,180,3,6,3,9,155,158,10,7,0,0,156,159,5,51,0,0,157, - 159,5,75,0,0,158,156,1,0,0,0,158,157,1,0,0,0,159,160,1,0,0,0,160, - 180,3,6,3,8,161,162,10,6,0,0,162,163,3,12,6,0,163,164,3,6,3,7,164, - 180,1,0,0,0,165,166,10,5,0,0,166,167,3,14,7,0,167,168,3,6,3,6,168, - 180,1,0,0,0,169,170,10,3,0,0,170,171,3,16,8,0,171,172,3,6,3,4,172, - 180,1,0,0,0,173,174,10,2,0,0,174,175,5,81,0,0,175,176,3,6,3,0,176, - 177,5,82,0,0,177,178,3,6,3,3,178,180,1,0,0,0,179,145,1,0,0,0,179, - 148,1,0,0,0,179,155,1,0,0,0,179,161,1,0,0,0,179,165,1,0,0,0,179, - 169,1,0,0,0,179,173,1,0,0,0,180,183,1,0,0,0,181,179,1,0,0,0,181, - 182,1,0,0,0,182,7,1,0,0,0,183,181,1,0,0,0,184,194,3,20,10,0,185, - 194,5,86,0,0,186,188,7,1,0,0,187,189,3,18,9,0,188,187,1,0,0,0,188, - 189,1,0,0,0,189,194,1,0,0,0,190,194,5,87,0,0,191,194,5,25,0,0,192, - 194,3,18,9,0,193,184,1,0,0,0,193,185,1,0,0,0,193,186,1,0,0,0,193, - 190,1,0,0,0,193,191,1,0,0,0,193,192,1,0,0,0,194,9,1,0,0,0,195,199, - 5,51,0,0,196,199,5,75,0,0,197,199,5,52,0,0,198,195,1,0,0,0,198,196, - 1,0,0,0,198,197,1,0,0,0,199,11,1,0,0,0,200,206,5,55,0,0,201,206, - 5,54,0,0,202,206,5,53,0,0,203,206,5,61,0,0,204,206,5,62,0,0,205, - 200,1,0,0,0,205,201,1,0,0,0,205,202,1,0,0,0,205,203,1,0,0,0,205, - 204,1,0,0,0,206,13,1,0,0,0,207,215,5,63,0,0,208,215,5,65,0,0,209, - 215,5,70,0,0,210,215,5,71,0,0,211,215,5,72,0,0,212,215,5,73,0,0, - 213,215,5,64,0,0,214,207,1,0,0,0,214,208,1,0,0,0,214,209,1,0,0,0, - 214,210,1,0,0,0,214,211,1,0,0,0,214,212,1,0,0,0,214,213,1,0,0,0, - 215,15,1,0,0,0,216,219,5,26,0,0,217,219,5,27,0,0,218,216,1,0,0,0, - 218,217,1,0,0,0,219,17,1,0,0,0,220,225,5,88,0,0,221,222,5,56,0,0, - 222,223,3,6,3,0,223,224,5,58,0,0,224,226,1,0,0,0,225,221,1,0,0,0, - 225,226,1,0,0,0,226,230,1,0,0,0,227,229,5,85,0,0,228,227,1,0,0,0, - 229,232,1,0,0,0,230,228,1,0,0,0,230,231,1,0,0,0,231,19,1,0,0,0,232, - 230,1,0,0,0,233,234,5,88,0,0,234,243,5,49,0,0,235,240,3,6,3,0,236, - 237,5,74,0,0,237,239,3,6,3,0,238,236,1,0,0,0,239,242,1,0,0,0,240, - 238,1,0,0,0,240,241,1,0,0,0,241,244,1,0,0,0,242,240,1,0,0,0,243, - 235,1,0,0,0,243,244,1,0,0,0,244,245,1,0,0,0,245,246,5,50,0,0,246, - 21,1,0,0,0,247,249,5,29,0,0,248,247,1,0,0,0,248,249,1,0,0,0,249, - 250,1,0,0,0,250,251,5,16,0,0,251,252,5,88,0,0,252,253,3,0,0,0,253, - 254,5,76,0,0,254,256,3,6,3,0,255,257,5,84,0,0,256,255,1,0,0,0,256, - 257,1,0,0,0,257,261,1,0,0,0,258,260,3,42,21,0,259,258,1,0,0,0,260, - 263,1,0,0,0,261,259,1,0,0,0,261,262,1,0,0,0,262,264,1,0,0,0,263, - 261,1,0,0,0,264,265,5,9,0,0,265,23,1,0,0,0,266,267,3,18,9,0,267, - 268,5,76,0,0,268,270,3,6,3,0,269,271,5,84,0,0,270,269,1,0,0,0,270, - 271,1,0,0,0,271,275,1,0,0,0,272,274,3,42,21,0,273,272,1,0,0,0,274, - 277,1,0,0,0,275,273,1,0,0,0,275,276,1,0,0,0,276,278,1,0,0,0,277, - 275,1,0,0,0,278,279,5,9,0,0,279,25,1,0,0,0,280,281,5,30,0,0,281, - 282,3,18,9,0,282,283,5,76,0,0,283,291,3,6,3,0,284,285,5,4,0,0,285, - 286,3,18,9,0,286,287,5,76,0,0,287,288,3,6,3,0,288,290,1,0,0,0,289, - 284,1,0,0,0,290,293,1,0,0,0,291,289,1,0,0,0,291,292,1,0,0,0,292, - 295,1,0,0,0,293,291,1,0,0,0,294,296,5,84,0,0,295,294,1,0,0,0,295, - 296,1,0,0,0,296,297,1,0,0,0,297,298,5,9,0,0,298,27,1,0,0,0,299,300, - 5,9,0,0,300,302,5,1,0,0,301,303,3,30,15,0,302,301,1,0,0,0,303,304, - 1,0,0,0,304,302,1,0,0,0,304,305,1,0,0,0,305,306,1,0,0,0,306,307, - 5,2,0,0,307,29,1,0,0,0,308,311,3,34,17,0,309,311,3,32,16,0,310,308, - 1,0,0,0,310,309,1,0,0,0,311,31,1,0,0,0,312,316,3,50,25,0,313,316, - 3,58,29,0,314,316,3,60,30,0,315,312,1,0,0,0,315,313,1,0,0,0,315, - 314,1,0,0,0,316,33,1,0,0,0,317,322,3,36,18,0,318,322,3,20,10,0,319, - 322,3,38,19,0,320,322,3,48,24,0,321,317,1,0,0,0,321,318,1,0,0,0, - 321,319,1,0,0,0,321,320,1,0,0,0,322,323,1,0,0,0,323,324,5,9,0,0, - 324,35,1,0,0,0,325,331,3,18,9,0,326,332,5,76,0,0,327,332,5,66,0, - 0,328,332,5,67,0,0,329,332,5,68,0,0,330,332,5,69,0,0,331,326,1,0, - 0,0,331,327,1,0,0,0,331,328,1,0,0,0,331,329,1,0,0,0,331,330,1,0, - 0,0,332,333,1,0,0,0,333,334,3,6,3,0,334,37,1,0,0,0,335,337,5,29, - 0,0,336,335,1,0,0,0,336,337,1,0,0,0,337,339,1,0,0,0,338,340,5,16, - 0,0,339,338,1,0,0,0,339,340,1,0,0,0,340,341,1,0,0,0,341,346,3,18, - 9,0,342,343,5,74,0,0,343,345,3,18,9,0,344,342,1,0,0,0,345,348,1, - 0,0,0,346,344,1,0,0,0,346,347,1,0,0,0,347,349,1,0,0,0,348,346,1, - 0,0,0,349,352,3,0,0,0,350,351,5,76,0,0,351,353,3,6,3,0,352,350,1, - 0,0,0,352,353,1,0,0,0,353,358,1,0,0,0,354,355,5,59,0,0,355,356,3, - 6,3,0,356,357,5,60,0,0,357,359,1,0,0,0,358,354,1,0,0,0,358,359,1, - 0,0,0,359,363,1,0,0,0,360,362,3,42,21,0,361,360,1,0,0,0,362,365, - 1,0,0,0,363,361,1,0,0,0,363,364,1,0,0,0,364,39,1,0,0,0,365,363,1, - 0,0,0,366,367,3,38,19,0,367,368,5,9,0,0,368,41,1,0,0,0,369,377,5, - 45,0,0,370,377,5,46,0,0,371,372,5,47,0,0,372,373,3,44,22,0,373,374, - 5,83,0,0,374,375,3,46,23,0,375,377,1,0,0,0,376,369,1,0,0,0,376,370, - 1,0,0,0,376,371,1,0,0,0,377,43,1,0,0,0,378,379,5,88,0,0,379,45,1, - 0,0,0,380,381,5,88,0,0,381,47,1,0,0,0,382,384,5,17,0,0,383,385,3, - 6,3,0,384,383,1,0,0,0,384,385,1,0,0,0,385,49,1,0,0,0,386,390,3,52, - 26,0,387,389,3,54,27,0,388,387,1,0,0,0,389,392,1,0,0,0,390,388,1, - 0,0,0,390,391,1,0,0,0,391,394,1,0,0,0,392,390,1,0,0,0,393,395,3, - 56,28,0,394,393,1,0,0,0,394,395,1,0,0,0,395,51,1,0,0,0,396,397,5, - 18,0,0,397,398,3,6,3,0,398,399,5,82,0,0,399,400,3,28,14,0,400,53, - 1,0,0,0,401,402,5,19,0,0,402,403,3,6,3,0,403,404,5,82,0,0,404,405, - 3,28,14,0,405,55,1,0,0,0,406,407,5,20,0,0,407,408,5,82,0,0,408,409, - 3,28,14,0,409,57,1,0,0,0,410,411,5,21,0,0,411,412,5,88,0,0,412,413, - 5,23,0,0,413,414,3,6,3,0,414,415,5,48,0,0,415,416,3,6,3,0,416,418, - 5,24,0,0,417,419,5,75,0,0,418,417,1,0,0,0,418,419,1,0,0,0,419,420, - 1,0,0,0,420,421,7,1,0,0,421,422,5,82,0,0,422,423,3,28,14,0,423,59, - 1,0,0,0,424,425,5,22,0,0,425,426,3,6,3,0,426,427,5,82,0,0,427,428, - 3,28,14,0,428,61,1,0,0,0,429,432,3,64,32,0,430,432,5,9,0,0,431,429, - 1,0,0,0,431,430,1,0,0,0,432,433,1,0,0,0,433,431,1,0,0,0,433,434, - 1,0,0,0,434,435,1,0,0,0,435,436,5,0,0,1,436,63,1,0,0,0,437,438,5, - 31,0,0,438,439,5,88,0,0,439,440,3,66,33,0,440,65,1,0,0,0,441,442, - 5,82,0,0,442,443,5,9,0,0,443,452,5,1,0,0,444,453,3,72,36,0,445,453, - 3,76,38,0,446,453,3,78,39,0,447,453,3,86,43,0,448,453,3,88,44,0, - 449,453,3,68,34,0,450,453,3,70,35,0,451,453,3,74,37,0,452,444,1, - 0,0,0,452,445,1,0,0,0,452,446,1,0,0,0,452,447,1,0,0,0,452,448,1, - 0,0,0,452,449,1,0,0,0,452,450,1,0,0,0,452,451,1,0,0,0,453,454,1, - 0,0,0,454,452,1,0,0,0,454,455,1,0,0,0,455,456,1,0,0,0,456,457,5, - 2,0,0,457,67,1,0,0,0,458,459,5,40,0,0,459,460,5,49,0,0,460,465,5, - 88,0,0,461,462,5,74,0,0,462,464,3,92,46,0,463,461,1,0,0,0,464,467, - 1,0,0,0,465,463,1,0,0,0,465,466,1,0,0,0,466,468,1,0,0,0,467,465, - 1,0,0,0,468,469,5,50,0,0,469,470,5,82,0,0,470,471,3,28,14,0,471, - 69,1,0,0,0,472,473,5,41,0,0,473,474,5,49,0,0,474,479,3,6,3,0,475, - 476,5,74,0,0,476,478,3,92,46,0,477,475,1,0,0,0,478,481,1,0,0,0,479, - 477,1,0,0,0,479,480,1,0,0,0,480,482,1,0,0,0,481,479,1,0,0,0,482, - 483,5,50,0,0,483,484,5,82,0,0,484,485,3,28,14,0,485,71,1,0,0,0,486, - 487,7,2,0,0,487,488,5,82,0,0,488,489,5,9,0,0,489,491,5,1,0,0,490, - 492,3,40,20,0,491,490,1,0,0,0,492,493,1,0,0,0,493,491,1,0,0,0,493, - 494,1,0,0,0,494,495,1,0,0,0,495,496,5,2,0,0,496,73,1,0,0,0,497,498, - 5,35,0,0,498,499,5,82,0,0,499,500,3,28,14,0,500,75,1,0,0,0,501,502, - 5,36,0,0,502,503,5,82,0,0,503,504,5,9,0,0,504,508,5,1,0,0,505,509, - 3,22,11,0,506,509,3,24,12,0,507,509,3,26,13,0,508,505,1,0,0,0,508, - 506,1,0,0,0,508,507,1,0,0,0,509,510,1,0,0,0,510,508,1,0,0,0,510, - 511,1,0,0,0,511,512,1,0,0,0,512,513,5,2,0,0,513,77,1,0,0,0,514,515, - 5,37,0,0,515,516,5,82,0,0,516,517,5,9,0,0,517,520,5,1,0,0,518,521, - 3,80,40,0,519,521,3,82,41,0,520,518,1,0,0,0,520,519,1,0,0,0,521, - 522,1,0,0,0,522,520,1,0,0,0,522,523,1,0,0,0,523,524,1,0,0,0,524, - 525,5,2,0,0,525,79,1,0,0,0,526,531,5,88,0,0,527,528,5,56,0,0,528, - 529,3,6,3,0,529,530,5,58,0,0,530,532,1,0,0,0,531,527,1,0,0,0,531, - 532,1,0,0,0,532,533,1,0,0,0,533,537,5,57,0,0,534,536,3,84,42,0,535, - 534,1,0,0,0,536,539,1,0,0,0,537,535,1,0,0,0,537,538,1,0,0,0,538, - 540,1,0,0,0,539,537,1,0,0,0,540,541,5,42,0,0,541,542,5,9,0,0,542, - 81,1,0,0,0,543,548,5,88,0,0,544,545,5,56,0,0,545,546,3,6,3,0,546, - 547,5,58,0,0,547,549,1,0,0,0,548,544,1,0,0,0,548,549,1,0,0,0,549, - 550,1,0,0,0,550,551,3,0,0,0,551,552,5,57,0,0,552,553,5,39,0,0,553, - 554,5,9,0,0,554,83,1,0,0,0,555,558,5,43,0,0,556,558,5,44,0,0,557, - 555,1,0,0,0,557,556,1,0,0,0,558,85,1,0,0,0,559,560,5,38,0,0,560, - 561,5,82,0,0,561,562,5,9,0,0,562,565,5,1,0,0,563,566,5,42,0,0,564, - 566,5,39,0,0,565,563,1,0,0,0,565,564,1,0,0,0,566,567,1,0,0,0,567, - 568,5,9,0,0,568,569,5,2,0,0,569,87,1,0,0,0,570,571,5,15,0,0,571, - 572,5,88,0,0,572,581,5,49,0,0,573,578,3,90,45,0,574,575,5,74,0,0, - 575,577,3,90,45,0,576,574,1,0,0,0,577,580,1,0,0,0,578,576,1,0,0, - 0,578,579,1,0,0,0,579,582,1,0,0,0,580,578,1,0,0,0,581,573,1,0,0, - 0,581,582,1,0,0,0,582,583,1,0,0,0,583,585,5,50,0,0,584,586,3,0,0, - 0,585,584,1,0,0,0,585,586,1,0,0,0,586,587,1,0,0,0,587,588,5,82,0, - 0,588,589,3,28,14,0,589,89,1,0,0,0,590,591,5,88,0,0,591,592,3,0, - 0,0,592,91,1,0,0,0,593,594,5,88,0,0,594,595,5,76,0,0,595,596,7,3, - 0,0,596,93,1,0,0,0,63,100,111,116,122,124,128,143,152,158,179,181, - 188,193,198,205,214,218,225,230,240,243,248,256,261,270,275,291, - 295,304,310,315,321,331,336,339,346,352,358,363,376,384,390,394, - 418,431,433,452,454,465,479,493,508,510,520,522,531,537,548,557, - 565,578,581,585 + 9,9,1,9,1,9,3,9,236,8,9,1,10,1,10,1,10,1,10,1,10,5,10,243,8,10,10, + 10,12,10,246,9,10,3,10,248,8,10,1,10,1,10,1,11,3,11,253,8,11,1,11, + 1,11,1,11,1,11,1,11,1,11,3,11,261,8,11,1,11,5,11,264,8,11,10,11, + 12,11,267,9,11,1,11,1,11,1,12,1,12,1,12,1,12,3,12,275,8,12,1,12, + 5,12,278,8,12,10,12,12,12,281,9,12,1,12,1,12,1,13,1,13,1,13,1,13, + 1,13,1,13,1,13,1,13,1,13,5,13,294,8,13,10,13,12,13,297,9,13,1,13, + 3,13,300,8,13,1,13,1,13,1,14,1,14,1,14,4,14,307,8,14,11,14,12,14, + 308,1,14,1,14,1,15,1,15,3,15,315,8,15,1,16,1,16,1,16,3,16,320,8, + 16,1,17,1,17,1,17,1,17,3,17,326,8,17,1,17,1,17,1,18,1,18,1,18,1, + 18,1,18,1,18,3,18,336,8,18,1,18,1,18,1,19,3,19,341,8,19,1,19,3,19, + 344,8,19,1,19,1,19,1,19,5,19,349,8,19,10,19,12,19,352,9,19,1,19, + 1,19,1,19,3,19,357,8,19,1,19,1,19,1,19,1,19,3,19,363,8,19,1,19,5, + 19,366,8,19,10,19,12,19,369,9,19,1,20,1,20,1,20,1,21,1,21,1,21,1, + 21,1,21,1,21,1,21,3,21,381,8,21,1,22,1,22,1,23,1,23,1,24,1,24,3, + 24,389,8,24,1,25,1,25,5,25,393,8,25,10,25,12,25,396,9,25,1,25,3, + 25,399,8,25,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1, + 28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,423, + 8,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,31,1,31,4,31, + 436,8,31,11,31,12,31,437,1,31,1,31,1,32,1,32,1,32,1,32,1,33,1,33, + 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,4,33,457,8,33,11,33, + 12,33,458,1,33,1,33,1,34,1,34,1,34,1,34,1,34,5,34,468,8,34,10,34, + 12,34,471,9,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,5,35, + 482,8,35,10,35,12,35,485,9,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36, + 1,36,1,36,4,36,496,8,36,11,36,12,36,497,1,36,1,36,1,37,1,37,1,37, + 1,37,1,38,1,38,1,38,1,38,1,38,1,38,1,38,4,38,513,8,38,11,38,12,38, + 514,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,3,39,525,8,39,1,39,1, + 39,1,39,1,39,5,39,531,8,39,10,39,12,39,534,9,39,3,39,536,8,39,1, + 39,3,39,539,8,39,4,39,541,8,39,11,39,12,39,542,1,39,1,39,1,40,1, + 40,1,40,1,40,1,40,3,40,552,8,40,1,40,1,40,5,40,556,8,40,10,40,12, + 40,559,9,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,3,41,569,8,41, + 1,41,1,41,1,41,1,41,1,41,1,42,1,42,3,42,578,8,42,1,43,1,43,1,43, + 1,43,1,43,1,43,3,43,586,8,43,1,43,1,43,1,43,1,43,5,43,592,8,43,10, + 43,12,43,595,9,43,3,43,597,8,43,1,43,3,43,600,8,43,1,43,1,43,1,43, + 1,44,1,44,1,44,1,44,1,44,1,44,5,44,611,8,44,10,44,12,44,614,9,44, + 3,44,616,8,44,1,44,1,44,3,44,620,8,44,1,44,1,44,1,44,1,45,1,45,1, + 45,1,46,1,46,1,46,1,46,1,46,0,2,2,6,47,0,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,56,58,60,62, + 64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,0,4,2,0,51,51,75,75, + 1,0,90,91,1,0,32,34,3,0,25,25,87,88,90,91,694,0,100,1,0,0,0,2,111, + 1,0,0,0,4,128,1,0,0,0,6,143,1,0,0,0,8,193,1,0,0,0,10,198,1,0,0,0, + 12,205,1,0,0,0,14,214,1,0,0,0,16,218,1,0,0,0,18,220,1,0,0,0,20,237, + 1,0,0,0,22,252,1,0,0,0,24,270,1,0,0,0,26,284,1,0,0,0,28,303,1,0, + 0,0,30,314,1,0,0,0,32,319,1,0,0,0,34,325,1,0,0,0,36,329,1,0,0,0, + 38,340,1,0,0,0,40,370,1,0,0,0,42,380,1,0,0,0,44,382,1,0,0,0,46,384, + 1,0,0,0,48,386,1,0,0,0,50,390,1,0,0,0,52,400,1,0,0,0,54,405,1,0, + 0,0,56,410,1,0,0,0,58,414,1,0,0,0,60,428,1,0,0,0,62,435,1,0,0,0, + 64,441,1,0,0,0,66,445,1,0,0,0,68,462,1,0,0,0,70,476,1,0,0,0,72,490, + 1,0,0,0,74,501,1,0,0,0,76,505,1,0,0,0,78,518,1,0,0,0,80,546,1,0, + 0,0,82,563,1,0,0,0,84,577,1,0,0,0,86,579,1,0,0,0,88,604,1,0,0,0, + 90,624,1,0,0,0,92,627,1,0,0,0,94,101,5,10,0,0,95,101,5,11,0,0,96, + 101,5,12,0,0,97,101,5,13,0,0,98,101,5,14,0,0,99,101,3,2,1,0,100, + 94,1,0,0,0,100,95,1,0,0,0,100,96,1,0,0,0,100,97,1,0,0,0,100,98,1, + 0,0,0,100,99,1,0,0,0,101,1,1,0,0,0,102,103,6,1,-1,0,103,104,5,49, + 0,0,104,105,3,2,1,0,105,106,5,50,0,0,106,112,1,0,0,0,107,108,5,90, + 0,0,108,109,5,79,0,0,109,112,3,2,1,2,110,112,5,89,0,0,111,102,1, + 0,0,0,111,107,1,0,0,0,111,110,1,0,0,0,112,124,1,0,0,0,113,116,10, + 3,0,0,114,117,5,77,0,0,115,117,5,79,0,0,116,114,1,0,0,0,116,115, + 1,0,0,0,117,118,1,0,0,0,118,123,3,2,1,4,119,120,10,4,0,0,120,121, + 5,78,0,0,121,123,3,4,2,0,122,113,1,0,0,0,122,119,1,0,0,0,123,126, + 1,0,0,0,124,122,1,0,0,0,124,125,1,0,0,0,125,3,1,0,0,0,126,124,1, + 0,0,0,127,129,7,0,0,0,128,127,1,0,0,0,128,129,1,0,0,0,129,130,1, + 0,0,0,130,131,5,90,0,0,131,5,1,0,0,0,132,133,6,3,-1,0,133,134,5, + 49,0,0,134,135,3,6,3,0,135,136,5,50,0,0,136,144,1,0,0,0,137,138, + 3,10,5,0,138,139,3,6,3,9,139,144,1,0,0,0,140,141,5,28,0,0,141,144, + 3,6,3,4,142,144,3,8,4,0,143,132,1,0,0,0,143,137,1,0,0,0,143,140, + 1,0,0,0,143,142,1,0,0,0,144,181,1,0,0,0,145,146,10,10,0,0,146,147, + 5,78,0,0,147,180,3,6,3,10,148,152,10,8,0,0,149,153,5,77,0,0,150, + 153,5,79,0,0,151,153,5,80,0,0,152,149,1,0,0,0,152,150,1,0,0,0,152, + 151,1,0,0,0,153,154,1,0,0,0,154,180,3,6,3,9,155,158,10,7,0,0,156, + 159,5,51,0,0,157,159,5,75,0,0,158,156,1,0,0,0,158,157,1,0,0,0,159, + 160,1,0,0,0,160,180,3,6,3,8,161,162,10,6,0,0,162,163,3,12,6,0,163, + 164,3,6,3,7,164,180,1,0,0,0,165,166,10,5,0,0,166,167,3,14,7,0,167, + 168,3,6,3,6,168,180,1,0,0,0,169,170,10,3,0,0,170,171,3,16,8,0,171, + 172,3,6,3,4,172,180,1,0,0,0,173,174,10,2,0,0,174,175,5,81,0,0,175, + 176,3,6,3,0,176,177,5,82,0,0,177,178,3,6,3,3,178,180,1,0,0,0,179, + 145,1,0,0,0,179,148,1,0,0,0,179,155,1,0,0,0,179,161,1,0,0,0,179, + 165,1,0,0,0,179,169,1,0,0,0,179,173,1,0,0,0,180,183,1,0,0,0,181, + 179,1,0,0,0,181,182,1,0,0,0,182,7,1,0,0,0,183,181,1,0,0,0,184,194, + 3,20,10,0,185,194,5,87,0,0,186,188,7,1,0,0,187,189,3,18,9,0,188, + 187,1,0,0,0,188,189,1,0,0,0,189,194,1,0,0,0,190,194,5,88,0,0,191, + 194,5,25,0,0,192,194,3,18,9,0,193,184,1,0,0,0,193,185,1,0,0,0,193, + 186,1,0,0,0,193,190,1,0,0,0,193,191,1,0,0,0,193,192,1,0,0,0,194, + 9,1,0,0,0,195,199,5,51,0,0,196,199,5,75,0,0,197,199,5,52,0,0,198, + 195,1,0,0,0,198,196,1,0,0,0,198,197,1,0,0,0,199,11,1,0,0,0,200,206, + 5,55,0,0,201,206,5,54,0,0,202,206,5,53,0,0,203,206,5,61,0,0,204, + 206,5,62,0,0,205,200,1,0,0,0,205,201,1,0,0,0,205,202,1,0,0,0,205, + 203,1,0,0,0,205,204,1,0,0,0,206,13,1,0,0,0,207,215,5,63,0,0,208, + 215,5,65,0,0,209,215,5,70,0,0,210,215,5,71,0,0,211,215,5,72,0,0, + 212,215,5,73,0,0,213,215,5,64,0,0,214,207,1,0,0,0,214,208,1,0,0, + 0,214,209,1,0,0,0,214,210,1,0,0,0,214,211,1,0,0,0,214,212,1,0,0, + 0,214,213,1,0,0,0,215,15,1,0,0,0,216,219,5,26,0,0,217,219,5,27,0, + 0,218,216,1,0,0,0,218,217,1,0,0,0,219,17,1,0,0,0,220,225,5,89,0, + 0,221,222,5,56,0,0,222,223,3,6,3,0,223,224,5,58,0,0,224,226,1,0, + 0,0,225,221,1,0,0,0,225,226,1,0,0,0,226,230,1,0,0,0,227,229,5,85, + 0,0,228,227,1,0,0,0,229,232,1,0,0,0,230,228,1,0,0,0,230,231,1,0, + 0,0,231,235,1,0,0,0,232,230,1,0,0,0,233,234,5,86,0,0,234,236,3,18, + 9,0,235,233,1,0,0,0,235,236,1,0,0,0,236,19,1,0,0,0,237,238,5,89, + 0,0,238,247,5,49,0,0,239,244,3,6,3,0,240,241,5,74,0,0,241,243,3, + 6,3,0,242,240,1,0,0,0,243,246,1,0,0,0,244,242,1,0,0,0,244,245,1, + 0,0,0,245,248,1,0,0,0,246,244,1,0,0,0,247,239,1,0,0,0,247,248,1, + 0,0,0,248,249,1,0,0,0,249,250,5,50,0,0,250,21,1,0,0,0,251,253,5, + 29,0,0,252,251,1,0,0,0,252,253,1,0,0,0,253,254,1,0,0,0,254,255,5, + 16,0,0,255,256,5,89,0,0,256,257,3,0,0,0,257,258,5,76,0,0,258,260, + 3,6,3,0,259,261,5,84,0,0,260,259,1,0,0,0,260,261,1,0,0,0,261,265, + 1,0,0,0,262,264,3,42,21,0,263,262,1,0,0,0,264,267,1,0,0,0,265,263, + 1,0,0,0,265,266,1,0,0,0,266,268,1,0,0,0,267,265,1,0,0,0,268,269, + 5,9,0,0,269,23,1,0,0,0,270,271,3,18,9,0,271,272,5,76,0,0,272,274, + 3,6,3,0,273,275,5,84,0,0,274,273,1,0,0,0,274,275,1,0,0,0,275,279, + 1,0,0,0,276,278,3,42,21,0,277,276,1,0,0,0,278,281,1,0,0,0,279,277, + 1,0,0,0,279,280,1,0,0,0,280,282,1,0,0,0,281,279,1,0,0,0,282,283, + 5,9,0,0,283,25,1,0,0,0,284,285,5,30,0,0,285,286,3,18,9,0,286,287, + 5,76,0,0,287,295,3,6,3,0,288,289,5,4,0,0,289,290,3,18,9,0,290,291, + 5,76,0,0,291,292,3,6,3,0,292,294,1,0,0,0,293,288,1,0,0,0,294,297, + 1,0,0,0,295,293,1,0,0,0,295,296,1,0,0,0,296,299,1,0,0,0,297,295, + 1,0,0,0,298,300,5,84,0,0,299,298,1,0,0,0,299,300,1,0,0,0,300,301, + 1,0,0,0,301,302,5,9,0,0,302,27,1,0,0,0,303,304,5,9,0,0,304,306,5, + 1,0,0,305,307,3,30,15,0,306,305,1,0,0,0,307,308,1,0,0,0,308,306, + 1,0,0,0,308,309,1,0,0,0,309,310,1,0,0,0,310,311,5,2,0,0,311,29,1, + 0,0,0,312,315,3,34,17,0,313,315,3,32,16,0,314,312,1,0,0,0,314,313, + 1,0,0,0,315,31,1,0,0,0,316,320,3,50,25,0,317,320,3,58,29,0,318,320, + 3,60,30,0,319,316,1,0,0,0,319,317,1,0,0,0,319,318,1,0,0,0,320,33, + 1,0,0,0,321,326,3,36,18,0,322,326,3,20,10,0,323,326,3,38,19,0,324, + 326,3,48,24,0,325,321,1,0,0,0,325,322,1,0,0,0,325,323,1,0,0,0,325, + 324,1,0,0,0,326,327,1,0,0,0,327,328,5,9,0,0,328,35,1,0,0,0,329,335, + 3,18,9,0,330,336,5,76,0,0,331,336,5,66,0,0,332,336,5,67,0,0,333, + 336,5,68,0,0,334,336,5,69,0,0,335,330,1,0,0,0,335,331,1,0,0,0,335, + 332,1,0,0,0,335,333,1,0,0,0,335,334,1,0,0,0,336,337,1,0,0,0,337, + 338,3,6,3,0,338,37,1,0,0,0,339,341,5,29,0,0,340,339,1,0,0,0,340, + 341,1,0,0,0,341,343,1,0,0,0,342,344,5,16,0,0,343,342,1,0,0,0,343, + 344,1,0,0,0,344,345,1,0,0,0,345,350,3,18,9,0,346,347,5,74,0,0,347, + 349,3,18,9,0,348,346,1,0,0,0,349,352,1,0,0,0,350,348,1,0,0,0,350, + 351,1,0,0,0,351,353,1,0,0,0,352,350,1,0,0,0,353,356,3,0,0,0,354, + 355,5,76,0,0,355,357,3,6,3,0,356,354,1,0,0,0,356,357,1,0,0,0,357, + 362,1,0,0,0,358,359,5,59,0,0,359,360,3,6,3,0,360,361,5,60,0,0,361, + 363,1,0,0,0,362,358,1,0,0,0,362,363,1,0,0,0,363,367,1,0,0,0,364, + 366,3,42,21,0,365,364,1,0,0,0,366,369,1,0,0,0,367,365,1,0,0,0,367, + 368,1,0,0,0,368,39,1,0,0,0,369,367,1,0,0,0,370,371,3,38,19,0,371, + 372,5,9,0,0,372,41,1,0,0,0,373,381,5,45,0,0,374,381,5,46,0,0,375, + 376,5,47,0,0,376,377,3,44,22,0,377,378,5,83,0,0,378,379,3,46,23, + 0,379,381,1,0,0,0,380,373,1,0,0,0,380,374,1,0,0,0,380,375,1,0,0, + 0,381,43,1,0,0,0,382,383,5,89,0,0,383,45,1,0,0,0,384,385,5,89,0, + 0,385,47,1,0,0,0,386,388,5,17,0,0,387,389,3,6,3,0,388,387,1,0,0, + 0,388,389,1,0,0,0,389,49,1,0,0,0,390,394,3,52,26,0,391,393,3,54, + 27,0,392,391,1,0,0,0,393,396,1,0,0,0,394,392,1,0,0,0,394,395,1,0, + 0,0,395,398,1,0,0,0,396,394,1,0,0,0,397,399,3,56,28,0,398,397,1, + 0,0,0,398,399,1,0,0,0,399,51,1,0,0,0,400,401,5,18,0,0,401,402,3, + 6,3,0,402,403,5,82,0,0,403,404,3,28,14,0,404,53,1,0,0,0,405,406, + 5,19,0,0,406,407,3,6,3,0,407,408,5,82,0,0,408,409,3,28,14,0,409, + 55,1,0,0,0,410,411,5,20,0,0,411,412,5,82,0,0,412,413,3,28,14,0,413, + 57,1,0,0,0,414,415,5,21,0,0,415,416,5,89,0,0,416,417,5,23,0,0,417, + 418,3,6,3,0,418,419,5,48,0,0,419,420,3,6,3,0,420,422,5,24,0,0,421, + 423,5,75,0,0,422,421,1,0,0,0,422,423,1,0,0,0,423,424,1,0,0,0,424, + 425,7,1,0,0,425,426,5,82,0,0,426,427,3,28,14,0,427,59,1,0,0,0,428, + 429,5,22,0,0,429,430,3,6,3,0,430,431,5,82,0,0,431,432,3,28,14,0, + 432,61,1,0,0,0,433,436,3,64,32,0,434,436,5,9,0,0,435,433,1,0,0,0, + 435,434,1,0,0,0,436,437,1,0,0,0,437,435,1,0,0,0,437,438,1,0,0,0, + 438,439,1,0,0,0,439,440,5,0,0,1,440,63,1,0,0,0,441,442,5,31,0,0, + 442,443,5,89,0,0,443,444,3,66,33,0,444,65,1,0,0,0,445,446,5,82,0, + 0,446,447,5,9,0,0,447,456,5,1,0,0,448,457,3,72,36,0,449,457,3,76, + 38,0,450,457,3,78,39,0,451,457,3,86,43,0,452,457,3,88,44,0,453,457, + 3,68,34,0,454,457,3,70,35,0,455,457,3,74,37,0,456,448,1,0,0,0,456, + 449,1,0,0,0,456,450,1,0,0,0,456,451,1,0,0,0,456,452,1,0,0,0,456, + 453,1,0,0,0,456,454,1,0,0,0,456,455,1,0,0,0,457,458,1,0,0,0,458, + 456,1,0,0,0,458,459,1,0,0,0,459,460,1,0,0,0,460,461,5,2,0,0,461, + 67,1,0,0,0,462,463,5,40,0,0,463,464,5,49,0,0,464,469,5,89,0,0,465, + 466,5,74,0,0,466,468,3,92,46,0,467,465,1,0,0,0,468,471,1,0,0,0,469, + 467,1,0,0,0,469,470,1,0,0,0,470,472,1,0,0,0,471,469,1,0,0,0,472, + 473,5,50,0,0,473,474,5,82,0,0,474,475,3,28,14,0,475,69,1,0,0,0,476, + 477,5,41,0,0,477,478,5,49,0,0,478,483,3,6,3,0,479,480,5,74,0,0,480, + 482,3,92,46,0,481,479,1,0,0,0,482,485,1,0,0,0,483,481,1,0,0,0,483, + 484,1,0,0,0,484,486,1,0,0,0,485,483,1,0,0,0,486,487,5,50,0,0,487, + 488,5,82,0,0,488,489,3,28,14,0,489,71,1,0,0,0,490,491,7,2,0,0,491, + 492,5,82,0,0,492,493,5,9,0,0,493,495,5,1,0,0,494,496,3,40,20,0,495, + 494,1,0,0,0,496,497,1,0,0,0,497,495,1,0,0,0,497,498,1,0,0,0,498, + 499,1,0,0,0,499,500,5,2,0,0,500,73,1,0,0,0,501,502,5,35,0,0,502, + 503,5,82,0,0,503,504,3,28,14,0,504,75,1,0,0,0,505,506,5,36,0,0,506, + 507,5,82,0,0,507,508,5,9,0,0,508,512,5,1,0,0,509,513,3,22,11,0,510, + 513,3,24,12,0,511,513,3,26,13,0,512,509,1,0,0,0,512,510,1,0,0,0, + 512,511,1,0,0,0,513,514,1,0,0,0,514,512,1,0,0,0,514,515,1,0,0,0, + 515,516,1,0,0,0,516,517,5,2,0,0,517,77,1,0,0,0,518,519,5,37,0,0, + 519,520,5,82,0,0,520,521,5,9,0,0,521,540,5,1,0,0,522,525,3,80,40, + 0,523,525,3,82,41,0,524,522,1,0,0,0,524,523,1,0,0,0,525,538,1,0, + 0,0,526,535,5,49,0,0,527,532,3,90,45,0,528,529,5,74,0,0,529,531, + 3,90,45,0,530,528,1,0,0,0,531,534,1,0,0,0,532,530,1,0,0,0,532,533, + 1,0,0,0,533,536,1,0,0,0,534,532,1,0,0,0,535,527,1,0,0,0,535,536, + 1,0,0,0,536,537,1,0,0,0,537,539,5,50,0,0,538,526,1,0,0,0,538,539, + 1,0,0,0,539,541,1,0,0,0,540,524,1,0,0,0,541,542,1,0,0,0,542,540, + 1,0,0,0,542,543,1,0,0,0,543,544,1,0,0,0,544,545,5,2,0,0,545,79,1, + 0,0,0,546,551,5,89,0,0,547,548,5,56,0,0,548,549,3,6,3,0,549,550, + 5,58,0,0,550,552,1,0,0,0,551,547,1,0,0,0,551,552,1,0,0,0,552,553, + 1,0,0,0,553,557,5,57,0,0,554,556,3,84,42,0,555,554,1,0,0,0,556,559, + 1,0,0,0,557,555,1,0,0,0,557,558,1,0,0,0,558,560,1,0,0,0,559,557, + 1,0,0,0,560,561,5,42,0,0,561,562,5,9,0,0,562,81,1,0,0,0,563,568, + 5,89,0,0,564,565,5,56,0,0,565,566,3,6,3,0,566,567,5,58,0,0,567,569, + 1,0,0,0,568,564,1,0,0,0,568,569,1,0,0,0,569,570,1,0,0,0,570,571, + 3,0,0,0,571,572,5,57,0,0,572,573,5,39,0,0,573,574,5,9,0,0,574,83, + 1,0,0,0,575,578,5,43,0,0,576,578,5,44,0,0,577,575,1,0,0,0,577,576, + 1,0,0,0,578,85,1,0,0,0,579,580,5,38,0,0,580,581,5,82,0,0,581,582, + 5,9,0,0,582,585,5,1,0,0,583,586,5,42,0,0,584,586,5,39,0,0,585,583, + 1,0,0,0,585,584,1,0,0,0,586,599,1,0,0,0,587,596,5,49,0,0,588,593, + 3,90,45,0,589,590,5,74,0,0,590,592,3,90,45,0,591,589,1,0,0,0,592, + 595,1,0,0,0,593,591,1,0,0,0,593,594,1,0,0,0,594,597,1,0,0,0,595, + 593,1,0,0,0,596,588,1,0,0,0,596,597,1,0,0,0,597,598,1,0,0,0,598, + 600,5,50,0,0,599,587,1,0,0,0,599,600,1,0,0,0,600,601,1,0,0,0,601, + 602,5,9,0,0,602,603,5,2,0,0,603,87,1,0,0,0,604,605,5,15,0,0,605, + 606,5,89,0,0,606,615,5,49,0,0,607,612,3,90,45,0,608,609,5,74,0,0, + 609,611,3,90,45,0,610,608,1,0,0,0,611,614,1,0,0,0,612,610,1,0,0, + 0,612,613,1,0,0,0,613,616,1,0,0,0,614,612,1,0,0,0,615,607,1,0,0, + 0,615,616,1,0,0,0,616,617,1,0,0,0,617,619,5,50,0,0,618,620,3,0,0, + 0,619,618,1,0,0,0,619,620,1,0,0,0,620,621,1,0,0,0,621,622,5,82,0, + 0,622,623,3,28,14,0,623,89,1,0,0,0,624,625,5,89,0,0,625,626,3,0, + 0,0,626,91,1,0,0,0,627,628,5,89,0,0,628,629,5,76,0,0,629,630,7,3, + 0,0,630,93,1,0,0,0,70,100,111,116,122,124,128,143,152,158,179,181, + 188,193,198,205,214,218,225,230,235,244,247,252,260,265,274,279, + 295,299,308,314,319,325,335,340,343,350,356,362,367,380,388,394, + 398,422,435,437,456,458,469,483,497,512,514,524,532,535,538,542, + 551,557,568,577,585,593,596,599,612,615,619 ] class PyNestMLParser ( Parser ): @@ -257,7 +271,7 @@ class PyNestMLParser ( Parser ): "'<<'", "'>>'", "'<'", "'>'", "'<='", "'+='", "'-='", "'*='", "'/='", "'=='", "'!='", "'<>'", "'>='", "','", "'-'", "'='", "'*'", "'**'", "'/'", "'%'", "'?'", "':'", - "'::'", "';'", "'''" ] + "'::'", "';'", "'''", "'.'" ] symbolicNames = [ "", "INDENT", "DEDENT", "DOCSTRING_TRIPLEQUOTE", "KERNEL_JOINING", "WS", "LINE_ESCAPE", "DOCSTRING", @@ -283,8 +297,8 @@ class PyNestMLParser ( Parser ): "RIGHT_ANGLE_EQUALS", "COMMA", "MINUS", "EQUALS", "STAR", "STAR_STAR", "FORWARD_SLASH", "PERCENT", "QUESTION", "COLON", "DOUBLE_COLON", "SEMICOLON", "DIFFERENTIAL_ORDER", - "BOOLEAN_LITERAL", "STRING_LITERAL", "NAME", "UNSIGNED_INTEGER", - "FLOAT" ] + "FULLSTOP", "BOOLEAN_LITERAL", "STRING_LITERAL", "NAME", + "UNSIGNED_INTEGER", "FLOAT" ] RULE_dataType = 0 RULE_unitType = 1 @@ -433,15 +447,16 @@ class PyNestMLParser ( Parser ): DOUBLE_COLON=83 SEMICOLON=84 DIFFERENTIAL_ORDER=85 - BOOLEAN_LITERAL=86 - STRING_LITERAL=87 - NAME=88 - UNSIGNED_INTEGER=89 - FLOAT=90 + FULLSTOP=86 + BOOLEAN_LITERAL=87 + STRING_LITERAL=88 + NAME=89 + UNSIGNED_INTEGER=90 + FLOAT=91 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.13.1") + self.checkVersion("4.10.1") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None @@ -500,32 +515,32 @@ def dataType(self): self.state = 100 self._errHandler.sync(self) token = self._input.LA(1) - if token in [10]: + if token in [PyNestMLParser.INTEGER_KEYWORD]: self.enterOuterAlt(localctx, 1) self.state = 94 localctx.isInt = self.match(PyNestMLParser.INTEGER_KEYWORD) pass - elif token in [11]: + elif token in [PyNestMLParser.REAL_KEYWORD]: self.enterOuterAlt(localctx, 2) self.state = 95 localctx.isReal = self.match(PyNestMLParser.REAL_KEYWORD) pass - elif token in [12]: + elif token in [PyNestMLParser.STRING_KEYWORD]: self.enterOuterAlt(localctx, 3) self.state = 96 localctx.isString = self.match(PyNestMLParser.STRING_KEYWORD) pass - elif token in [13]: + elif token in [PyNestMLParser.BOOLEAN_KEYWORD]: self.enterOuterAlt(localctx, 4) self.state = 97 localctx.isBool = self.match(PyNestMLParser.BOOLEAN_KEYWORD) pass - elif token in [14]: + elif token in [PyNestMLParser.VOID_KEYWORD]: self.enterOuterAlt(localctx, 5) self.state = 98 localctx.isVoid = self.match(PyNestMLParser.VOID_KEYWORD) pass - elif token in [49, 88, 89]: + elif token in [PyNestMLParser.LEFT_PAREN, PyNestMLParser.NAME, PyNestMLParser.UNSIGNED_INTEGER]: self.enterOuterAlt(localctx, 6) self.state = 99 localctx.unit = self.unitType(0) @@ -616,7 +631,7 @@ def unitType(self, _p:int=0): self.state = 111 self._errHandler.sync(self) token = self._input.LA(1) - if token in [49]: + if token in [PyNestMLParser.LEFT_PAREN]: self.state = 103 localctx.leftParentheses = self.match(PyNestMLParser.LEFT_PAREN) self.state = 104 @@ -624,7 +639,7 @@ def unitType(self, _p:int=0): self.state = 105 localctx.rightParentheses = self.match(PyNestMLParser.RIGHT_PAREN) pass - elif token in [89]: + elif token in [PyNestMLParser.UNSIGNED_INTEGER]: self.state = 107 localctx.unitlessLiteral = self.match(PyNestMLParser.UNSIGNED_INTEGER) self.state = 108 @@ -632,7 +647,7 @@ def unitType(self, _p:int=0): self.state = 109 localctx.right = self.unitType(2) pass - elif token in [88]: + elif token in [PyNestMLParser.NAME]: self.state = 110 localctx.unit = self.match(PyNestMLParser.NAME) pass @@ -662,11 +677,11 @@ def unitType(self, _p:int=0): self.state = 116 self._errHandler.sync(self) token = self._input.LA(1) - if token in [77]: + if token in [PyNestMLParser.STAR]: self.state = 114 localctx.timesOp = self.match(PyNestMLParser.STAR) pass - elif token in [79]: + elif token in [PyNestMLParser.FORWARD_SLASH]: self.state = 115 localctx.divOp = self.match(PyNestMLParser.FORWARD_SLASH) pass @@ -743,10 +758,10 @@ def unitTypeExponent(self): self.state = 128 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==51 or _la==75: + if _la==PyNestMLParser.PLUS or _la==PyNestMLParser.MINUS: self.state = 127 _la = self._input.LA(1) - if not(_la==51 or _la==75): + if not(_la==PyNestMLParser.PLUS or _la==PyNestMLParser.MINUS): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -869,7 +884,7 @@ def expression(self, _p:int=0): self.state = 143 self._errHandler.sync(self) token = self._input.LA(1) - if token in [49]: + if token in [PyNestMLParser.LEFT_PAREN]: self.state = 133 localctx.leftParentheses = self.match(PyNestMLParser.LEFT_PAREN) self.state = 134 @@ -877,19 +892,19 @@ def expression(self, _p:int=0): self.state = 135 localctx.rightParentheses = self.match(PyNestMLParser.RIGHT_PAREN) pass - elif token in [51, 52, 75]: + elif token in [PyNestMLParser.PLUS, PyNestMLParser.TILDE, PyNestMLParser.MINUS]: self.state = 137 self.unaryOperator() self.state = 138 localctx.term = self.expression(9) pass - elif token in [28]: + elif token in [PyNestMLParser.NOT_KEYWORD]: self.state = 140 localctx.logicalNot = self.match(PyNestMLParser.NOT_KEYWORD) self.state = 141 localctx.term = self.expression(4) pass - elif token in [25, 86, 87, 88, 89, 90]: + elif token in [PyNestMLParser.INF_KEYWORD, PyNestMLParser.BOOLEAN_LITERAL, PyNestMLParser.STRING_LITERAL, PyNestMLParser.NAME, PyNestMLParser.UNSIGNED_INTEGER, PyNestMLParser.FLOAT]: self.state = 142 self.simpleExpression() pass @@ -933,15 +948,15 @@ def expression(self, _p:int=0): self.state = 152 self._errHandler.sync(self) token = self._input.LA(1) - if token in [77]: + if token in [PyNestMLParser.STAR]: self.state = 149 localctx.timesOp = self.match(PyNestMLParser.STAR) pass - elif token in [79]: + elif token in [PyNestMLParser.FORWARD_SLASH]: self.state = 150 localctx.divOp = self.match(PyNestMLParser.FORWARD_SLASH) pass - elif token in [80]: + elif token in [PyNestMLParser.PERCENT]: self.state = 151 localctx.moduloOp = self.match(PyNestMLParser.PERCENT) pass @@ -963,11 +978,11 @@ def expression(self, _p:int=0): self.state = 158 self._errHandler.sync(self) token = self._input.LA(1) - if token in [51]: + if token in [PyNestMLParser.PLUS]: self.state = 156 localctx.plusOp = self.match(PyNestMLParser.PLUS) pass - elif token in [75]: + elif token in [PyNestMLParser.MINUS]: self.state = 157 localctx.minusOp = self.match(PyNestMLParser.MINUS) pass @@ -1121,7 +1136,7 @@ def simpleExpression(self): self.enterOuterAlt(localctx, 3) self.state = 186 _la = self._input.LA(1) - if not(_la==89 or _la==90): + if not(_la==PyNestMLParser.UNSIGNED_INTEGER or _la==PyNestMLParser.FLOAT): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -1204,15 +1219,15 @@ def unaryOperator(self): self.state = 198 self._errHandler.sync(self) token = self._input.LA(1) - if token in [51]: + if token in [PyNestMLParser.PLUS]: self.state = 195 localctx.unaryPlus = self.match(PyNestMLParser.PLUS) pass - elif token in [75]: + elif token in [PyNestMLParser.MINUS]: self.state = 196 localctx.unaryMinus = self.match(PyNestMLParser.MINUS) pass - elif token in [52]: + elif token in [PyNestMLParser.TILDE]: self.state = 197 localctx.unaryTilde = self.match(PyNestMLParser.TILDE) pass @@ -1276,23 +1291,23 @@ def bitOperator(self): self.state = 205 self._errHandler.sync(self) token = self._input.LA(1) - if token in [55]: + if token in [PyNestMLParser.AMPERSAND]: self.state = 200 localctx.bitAnd = self.match(PyNestMLParser.AMPERSAND) pass - elif token in [54]: + elif token in [PyNestMLParser.CARET]: self.state = 201 localctx.bitXor = self.match(PyNestMLParser.CARET) pass - elif token in [53]: + elif token in [PyNestMLParser.PIPE]: self.state = 202 localctx.bitOr = self.match(PyNestMLParser.PIPE) pass - elif token in [61]: + elif token in [PyNestMLParser.LEFT_LEFT_ANGLE]: self.state = 203 localctx.bitShiftLeft = self.match(PyNestMLParser.LEFT_LEFT_ANGLE) pass - elif token in [62]: + elif token in [PyNestMLParser.RIGHT_RIGHT_ANGLE]: self.state = 204 localctx.bitShiftRight = self.match(PyNestMLParser.RIGHT_RIGHT_ANGLE) pass @@ -1364,31 +1379,31 @@ def comparisonOperator(self): self.state = 214 self._errHandler.sync(self) token = self._input.LA(1) - if token in [63]: + if token in [PyNestMLParser.LEFT_ANGLE]: self.state = 207 localctx.lt = self.match(PyNestMLParser.LEFT_ANGLE) pass - elif token in [65]: + elif token in [PyNestMLParser.LEFT_ANGLE_EQUALS]: self.state = 208 localctx.le = self.match(PyNestMLParser.LEFT_ANGLE_EQUALS) pass - elif token in [70]: + elif token in [PyNestMLParser.EQUALS_EQUALS]: self.state = 209 localctx.eq = self.match(PyNestMLParser.EQUALS_EQUALS) pass - elif token in [71]: + elif token in [PyNestMLParser.EXCLAMATION_EQUALS]: self.state = 210 localctx.ne = self.match(PyNestMLParser.EXCLAMATION_EQUALS) pass - elif token in [72]: + elif token in [PyNestMLParser.LEFT_ANGLE_RIGHT_ANGLE]: self.state = 211 localctx.ne2 = self.match(PyNestMLParser.LEFT_ANGLE_RIGHT_ANGLE) pass - elif token in [73]: + elif token in [PyNestMLParser.RIGHT_ANGLE_EQUALS]: self.state = 212 localctx.ge = self.match(PyNestMLParser.RIGHT_ANGLE_EQUALS) pass - elif token in [64]: + elif token in [PyNestMLParser.RIGHT_ANGLE]: self.state = 213 localctx.gt = self.match(PyNestMLParser.RIGHT_ANGLE) pass @@ -1440,11 +1455,11 @@ def logicalOperator(self): self.state = 218 self._errHandler.sync(self) token = self._input.LA(1) - if token in [26]: + if token in [PyNestMLParser.AND_KEYWORD]: self.state = 216 localctx.logicalAnd = self.match(PyNestMLParser.AND_KEYWORD) pass - elif token in [27]: + elif token in [PyNestMLParser.OR_KEYWORD]: self.state = 217 localctx.logicalOr = self.match(PyNestMLParser.OR_KEYWORD) pass @@ -1468,6 +1483,7 @@ def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): self.parser = parser self.name = None # Token self.vectorParameter = None # ExpressionContext + self.attribute = None # VariableContext def NAME(self): return self.getToken(PyNestMLParser.NAME, 0) @@ -1484,10 +1500,17 @@ def DIFFERENTIAL_ORDER(self, i:int=None): else: return self.getToken(PyNestMLParser.DIFFERENTIAL_ORDER, i) + def FULLSTOP(self): + return self.getToken(PyNestMLParser.FULLSTOP, 0) + def expression(self): return self.getTypedRuleContext(PyNestMLParser.ExpressionContext,0) + def variable(self): + return self.getTypedRuleContext(PyNestMLParser.VariableContext,0) + + def getRuleIndex(self): return PyNestMLParser.RULE_variable @@ -1531,6 +1554,16 @@ def variable(self): self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,18,self._ctx) + self.state = 235 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,19,self._ctx) + if la_ == 1: + self.state = 233 + self.match(PyNestMLParser.FULLSTOP) + self.state = 234 + localctx.attribute = self.variable() + + except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -1589,31 +1622,31 @@ def functionCall(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 233 + self.state = 237 localctx.calleeName = self.match(PyNestMLParser.NAME) - self.state = 234 + self.state = 238 self.match(PyNestMLParser.LEFT_PAREN) - self.state = 243 + self.state = 247 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 7318349696466944) != 0) or ((((_la - 75)) & ~0x3f) == 0 and ((1 << (_la - 75)) & 63489) != 0): - self.state = 235 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INF_KEYWORD) | (1 << PyNestMLParser.NOT_KEYWORD) | (1 << PyNestMLParser.LEFT_PAREN) | (1 << PyNestMLParser.PLUS) | (1 << PyNestMLParser.TILDE))) != 0) or ((((_la - 75)) & ~0x3f) == 0 and ((1 << (_la - 75)) & ((1 << (PyNestMLParser.MINUS - 75)) | (1 << (PyNestMLParser.BOOLEAN_LITERAL - 75)) | (1 << (PyNestMLParser.STRING_LITERAL - 75)) | (1 << (PyNestMLParser.NAME - 75)) | (1 << (PyNestMLParser.UNSIGNED_INTEGER - 75)) | (1 << (PyNestMLParser.FLOAT - 75)))) != 0): + self.state = 239 self.expression(0) - self.state = 240 + self.state = 244 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==74: - self.state = 236 + while _la==PyNestMLParser.COMMA: + self.state = 240 self.match(PyNestMLParser.COMMA) - self.state = 237 + self.state = 241 self.expression(0) - self.state = 242 + self.state = 246 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 245 + self.state = 249 self.match(PyNestMLParser.RIGHT_PAREN) except RecognitionException as re: localctx.exception = re @@ -1686,43 +1719,43 @@ def inlineExpression(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 248 + self.state = 252 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==29: - self.state = 247 + if _la==PyNestMLParser.RECORDABLE_KEYWORD: + self.state = 251 localctx.recordable = self.match(PyNestMLParser.RECORDABLE_KEYWORD) - self.state = 250 + self.state = 254 self.match(PyNestMLParser.INLINE_KEYWORD) - self.state = 251 + self.state = 255 localctx.variableName = self.match(PyNestMLParser.NAME) - self.state = 252 + self.state = 256 self.dataType() - self.state = 253 + self.state = 257 self.match(PyNestMLParser.EQUALS) - self.state = 254 + self.state = 258 self.expression(0) - self.state = 256 + self.state = 260 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==84: - self.state = 255 + if _la==PyNestMLParser.SEMICOLON: + self.state = 259 self.match(PyNestMLParser.SEMICOLON) - self.state = 261 + self.state = 265 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 246290604621824) != 0): - self.state = 258 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.DECORATOR_HOMOGENEOUS) | (1 << PyNestMLParser.DECORATOR_HETEROGENEOUS) | (1 << PyNestMLParser.AT))) != 0): + self.state = 262 localctx.decorator = self.anyDecorator() - self.state = 263 + self.state = 267 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 264 + self.state = 268 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -1786,31 +1819,31 @@ def odeEquation(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 266 + self.state = 270 localctx.lhs = self.variable() - self.state = 267 + self.state = 271 self.match(PyNestMLParser.EQUALS) - self.state = 268 + self.state = 272 localctx.rhs = self.expression(0) - self.state = 270 + self.state = 274 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==84: - self.state = 269 + if _la==PyNestMLParser.SEMICOLON: + self.state = 273 self.match(PyNestMLParser.SEMICOLON) - self.state = 275 + self.state = 279 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 246290604621824) != 0): - self.state = 272 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.DECORATOR_HOMOGENEOUS) | (1 << PyNestMLParser.DECORATOR_HETEROGENEOUS) | (1 << PyNestMLParser.AT))) != 0): + self.state = 276 localctx.decorator = self.anyDecorator() - self.state = 277 + self.state = 281 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 278 + self.state = 282 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -1882,39 +1915,39 @@ def kernel(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 280 + self.state = 284 self.match(PyNestMLParser.KERNEL_KEYWORD) - self.state = 281 + self.state = 285 self.variable() - self.state = 282 + self.state = 286 self.match(PyNestMLParser.EQUALS) - self.state = 283 + self.state = 287 self.expression(0) - self.state = 291 + self.state = 295 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==4: - self.state = 284 + while _la==PyNestMLParser.KERNEL_JOINING: + self.state = 288 self.match(PyNestMLParser.KERNEL_JOINING) - self.state = 285 + self.state = 289 self.variable() - self.state = 286 + self.state = 290 self.match(PyNestMLParser.EQUALS) - self.state = 287 + self.state = 291 self.expression(0) - self.state = 293 + self.state = 297 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 295 + self.state = 299 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==84: - self.state = 294 + if _la==PyNestMLParser.SEMICOLON: + self.state = 298 self.match(PyNestMLParser.SEMICOLON) - self.state = 297 + self.state = 301 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -1967,23 +2000,23 @@ def block(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 299 + self.state = 303 self.match(PyNestMLParser.NEWLINE) - self.state = 300 + self.state = 304 self.match(PyNestMLParser.INDENT) - self.state = 302 + self.state = 306 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 301 + self.state = 305 self.stmt() - self.state = 304 + self.state = 308 self._errHandler.sync(self) _la = self._input.LA(1) - if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 543621120) != 0) or _la==88): + if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INLINE_KEYWORD) | (1 << PyNestMLParser.RETURN_KEYWORD) | (1 << PyNestMLParser.IF_KEYWORD) | (1 << PyNestMLParser.FOR_KEYWORD) | (1 << PyNestMLParser.WHILE_KEYWORD) | (1 << PyNestMLParser.RECORDABLE_KEYWORD))) != 0) or _la==PyNestMLParser.NAME): break - self.state = 306 + self.state = 310 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -2026,17 +2059,17 @@ def stmt(self): localctx = PyNestMLParser.StmtContext(self, self._ctx, self.state) self.enterRule(localctx, 30, self.RULE_stmt) try: - self.state = 310 + self.state = 314 self._errHandler.sync(self) token = self._input.LA(1) - if token in [16, 17, 29, 88]: + if token in [PyNestMLParser.INLINE_KEYWORD, PyNestMLParser.RETURN_KEYWORD, PyNestMLParser.RECORDABLE_KEYWORD, PyNestMLParser.NAME]: self.enterOuterAlt(localctx, 1) - self.state = 308 + self.state = 312 self.smallStmt() pass - elif token in [18, 21, 22]: + elif token in [PyNestMLParser.IF_KEYWORD, PyNestMLParser.FOR_KEYWORD, PyNestMLParser.WHILE_KEYWORD]: self.enterOuterAlt(localctx, 2) - self.state = 309 + self.state = 313 self.compoundStmt() pass else: @@ -2087,22 +2120,22 @@ def compoundStmt(self): localctx = PyNestMLParser.CompoundStmtContext(self, self._ctx, self.state) self.enterRule(localctx, 32, self.RULE_compoundStmt) try: - self.state = 315 + self.state = 319 self._errHandler.sync(self) token = self._input.LA(1) - if token in [18]: + if token in [PyNestMLParser.IF_KEYWORD]: self.enterOuterAlt(localctx, 1) - self.state = 312 + self.state = 316 self.ifStmt() pass - elif token in [21]: + elif token in [PyNestMLParser.FOR_KEYWORD]: self.enterOuterAlt(localctx, 2) - self.state = 313 + self.state = 317 self.forStmt() pass - elif token in [22]: + elif token in [PyNestMLParser.WHILE_KEYWORD]: self.enterOuterAlt(localctx, 3) - self.state = 314 + self.state = 318 self.whileStmt() pass else: @@ -2161,31 +2194,31 @@ def smallStmt(self): self.enterRule(localctx, 34, self.RULE_smallStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 321 + self.state = 325 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,31,self._ctx) + la_ = self._interp.adaptivePredict(self._input,32,self._ctx) if la_ == 1: - self.state = 317 + self.state = 321 self.assignment() pass elif la_ == 2: - self.state = 318 + self.state = 322 self.functionCall() pass elif la_ == 3: - self.state = 319 + self.state = 323 self.declaration() pass elif la_ == 4: - self.state = 320 + self.state = 324 self.returnStmt() pass - self.state = 323 + self.state = 327 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -2250,35 +2283,35 @@ def assignment(self): self.enterRule(localctx, 36, self.RULE_assignment) try: self.enterOuterAlt(localctx, 1) - self.state = 325 + self.state = 329 localctx.lhs_variable = self.variable() - self.state = 331 + self.state = 335 self._errHandler.sync(self) token = self._input.LA(1) - if token in [76]: - self.state = 326 + if token in [PyNestMLParser.EQUALS]: + self.state = 330 localctx.directAssignment = self.match(PyNestMLParser.EQUALS) pass - elif token in [66]: - self.state = 327 + elif token in [PyNestMLParser.PLUS_EQUALS]: + self.state = 331 localctx.compoundSum = self.match(PyNestMLParser.PLUS_EQUALS) pass - elif token in [67]: - self.state = 328 + elif token in [PyNestMLParser.MINUS_EQUALS]: + self.state = 332 localctx.compoundMinus = self.match(PyNestMLParser.MINUS_EQUALS) pass - elif token in [68]: - self.state = 329 + elif token in [PyNestMLParser.STAR_EQUALS]: + self.state = 333 localctx.compoundProduct = self.match(PyNestMLParser.STAR_EQUALS) pass - elif token in [69]: - self.state = 330 + elif token in [PyNestMLParser.FORWARD_SLASH_EQUALS]: + self.state = 334 localctx.compoundQuotient = self.match(PyNestMLParser.FORWARD_SLASH_EQUALS) pass else: raise NoViableAltException(self) - self.state = 333 + self.state = 337 self.expression(0) except RecognitionException as re: localctx.exception = re @@ -2366,67 +2399,67 @@ def declaration(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 336 + self.state = 340 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==29: - self.state = 335 + if _la==PyNestMLParser.RECORDABLE_KEYWORD: + self.state = 339 localctx.isRecordable = self.match(PyNestMLParser.RECORDABLE_KEYWORD) - self.state = 339 + self.state = 343 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==16: - self.state = 338 + if _la==PyNestMLParser.INLINE_KEYWORD: + self.state = 342 localctx.isInlineExpression = self.match(PyNestMLParser.INLINE_KEYWORD) - self.state = 341 + self.state = 345 self.variable() - self.state = 346 + self.state = 350 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==74: - self.state = 342 + while _la==PyNestMLParser.COMMA: + self.state = 346 self.match(PyNestMLParser.COMMA) - self.state = 343 + self.state = 347 self.variable() - self.state = 348 + self.state = 352 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 349 + self.state = 353 self.dataType() - self.state = 352 + self.state = 356 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==76: - self.state = 350 + if _la==PyNestMLParser.EQUALS: + self.state = 354 self.match(PyNestMLParser.EQUALS) - self.state = 351 + self.state = 355 localctx.rhs = self.expression(0) - self.state = 358 + self.state = 362 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==59: - self.state = 354 + if _la==PyNestMLParser.LEFT_LEFT_SQUARE: + self.state = 358 self.match(PyNestMLParser.LEFT_LEFT_SQUARE) - self.state = 355 + self.state = 359 localctx.invariant = self.expression(0) - self.state = 356 + self.state = 360 self.match(PyNestMLParser.RIGHT_RIGHT_SQUARE) - self.state = 363 + self.state = 367 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 246290604621824) != 0): - self.state = 360 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.DECORATOR_HOMOGENEOUS) | (1 << PyNestMLParser.DECORATOR_HETEROGENEOUS) | (1 << PyNestMLParser.AT))) != 0): + self.state = 364 localctx.decorator = self.anyDecorator() - self.state = 365 + self.state = 369 self._errHandler.sync(self) _la = self._input.LA(1) @@ -2471,9 +2504,9 @@ def declaration_newline(self): self.enterRule(localctx, 40, self.RULE_declaration_newline) try: self.enterOuterAlt(localctx, 1) - self.state = 366 + self.state = 370 self.declaration() - self.state = 367 + self.state = 371 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -2528,28 +2561,28 @@ def anyDecorator(self): localctx = PyNestMLParser.AnyDecoratorContext(self, self._ctx, self.state) self.enterRule(localctx, 42, self.RULE_anyDecorator) try: - self.state = 376 + self.state = 380 self._errHandler.sync(self) token = self._input.LA(1) - if token in [45]: + if token in [PyNestMLParser.DECORATOR_HOMOGENEOUS]: self.enterOuterAlt(localctx, 1) - self.state = 369 + self.state = 373 self.match(PyNestMLParser.DECORATOR_HOMOGENEOUS) pass - elif token in [46]: + elif token in [PyNestMLParser.DECORATOR_HETEROGENEOUS]: self.enterOuterAlt(localctx, 2) - self.state = 370 + self.state = 374 self.match(PyNestMLParser.DECORATOR_HETEROGENEOUS) pass - elif token in [47]: + elif token in [PyNestMLParser.AT]: self.enterOuterAlt(localctx, 3) - self.state = 371 + self.state = 375 self.match(PyNestMLParser.AT) - self.state = 372 + self.state = 376 self.namespaceDecoratorNamespace() - self.state = 373 + self.state = 377 self.match(PyNestMLParser.DOUBLE_COLON) - self.state = 374 + self.state = 378 self.namespaceDecoratorName() pass else: @@ -2593,7 +2626,7 @@ def namespaceDecoratorNamespace(self): self.enterRule(localctx, 44, self.RULE_namespaceDecoratorNamespace) try: self.enterOuterAlt(localctx, 1) - self.state = 378 + self.state = 382 localctx.name = self.match(PyNestMLParser.NAME) except RecognitionException as re: localctx.exception = re @@ -2633,7 +2666,7 @@ def namespaceDecoratorName(self): self.enterRule(localctx, 46, self.RULE_namespaceDecoratorName) try: self.enterOuterAlt(localctx, 1) - self.state = 380 + self.state = 384 localctx.name = self.match(PyNestMLParser.NAME) except RecognitionException as re: localctx.exception = re @@ -2677,13 +2710,13 @@ def returnStmt(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 382 + self.state = 386 self.match(PyNestMLParser.RETURN_KEYWORD) - self.state = 384 + self.state = 388 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 7318349696466944) != 0) or ((((_la - 75)) & ~0x3f) == 0 and ((1 << (_la - 75)) & 63489) != 0): - self.state = 383 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INF_KEYWORD) | (1 << PyNestMLParser.NOT_KEYWORD) | (1 << PyNestMLParser.LEFT_PAREN) | (1 << PyNestMLParser.PLUS) | (1 << PyNestMLParser.TILDE))) != 0) or ((((_la - 75)) & ~0x3f) == 0 and ((1 << (_la - 75)) & ((1 << (PyNestMLParser.MINUS - 75)) | (1 << (PyNestMLParser.BOOLEAN_LITERAL - 75)) | (1 << (PyNestMLParser.STRING_LITERAL - 75)) | (1 << (PyNestMLParser.NAME - 75)) | (1 << (PyNestMLParser.UNSIGNED_INTEGER - 75)) | (1 << (PyNestMLParser.FLOAT - 75)))) != 0): + self.state = 387 self.expression(0) @@ -2737,23 +2770,23 @@ def ifStmt(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 386 - self.ifClause() self.state = 390 + self.ifClause() + self.state = 394 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==19: - self.state = 387 + while _la==PyNestMLParser.ELIF_KEYWORD: + self.state = 391 self.elifClause() - self.state = 392 + self.state = 396 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 394 + self.state = 398 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==20: - self.state = 393 + if _la==PyNestMLParser.ELSE_KEYWORD: + self.state = 397 self.elseClause() @@ -2805,13 +2838,13 @@ def ifClause(self): self.enterRule(localctx, 52, self.RULE_ifClause) try: self.enterOuterAlt(localctx, 1) - self.state = 396 + self.state = 400 self.match(PyNestMLParser.IF_KEYWORD) - self.state = 397 + self.state = 401 self.expression(0) - self.state = 398 + self.state = 402 self.match(PyNestMLParser.COLON) - self.state = 399 + self.state = 403 self.block() except RecognitionException as re: localctx.exception = re @@ -2861,13 +2894,13 @@ def elifClause(self): self.enterRule(localctx, 54, self.RULE_elifClause) try: self.enterOuterAlt(localctx, 1) - self.state = 401 + self.state = 405 self.match(PyNestMLParser.ELIF_KEYWORD) - self.state = 402 + self.state = 406 self.expression(0) - self.state = 403 + self.state = 407 self.match(PyNestMLParser.COLON) - self.state = 404 + self.state = 408 self.block() except RecognitionException as re: localctx.exception = re @@ -2913,11 +2946,11 @@ def elseClause(self): self.enterRule(localctx, 56, self.RULE_elseClause) try: self.enterOuterAlt(localctx, 1) - self.state = 406 + self.state = 410 self.match(PyNestMLParser.ELSE_KEYWORD) - self.state = 407 + self.state = 411 self.match(PyNestMLParser.COLON) - self.state = 408 + self.state = 412 self.block() except RecognitionException as re: localctx.exception = re @@ -2996,39 +3029,39 @@ def forStmt(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 410 + self.state = 414 self.match(PyNestMLParser.FOR_KEYWORD) - self.state = 411 + self.state = 415 localctx.var = self.match(PyNestMLParser.NAME) - self.state = 412 + self.state = 416 self.match(PyNestMLParser.IN_KEYWORD) - self.state = 413 + self.state = 417 localctx.start_from = self.expression(0) - self.state = 414 + self.state = 418 self.match(PyNestMLParser.ELLIPSIS) - self.state = 415 + self.state = 419 localctx.end_at = self.expression(0) - self.state = 416 + self.state = 420 self.match(PyNestMLParser.STEP_KEYWORD) - self.state = 418 + self.state = 422 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==75: - self.state = 417 + if _la==PyNestMLParser.MINUS: + self.state = 421 localctx.negative = self.match(PyNestMLParser.MINUS) - self.state = 420 + self.state = 424 _la = self._input.LA(1) - if not(_la==89 or _la==90): + if not(_la==PyNestMLParser.UNSIGNED_INTEGER or _la==PyNestMLParser.FLOAT): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 421 + self.state = 425 self.match(PyNestMLParser.COLON) - self.state = 422 + self.state = 426 self.block() except RecognitionException as re: localctx.exception = re @@ -3078,13 +3111,13 @@ def whileStmt(self): self.enterRule(localctx, 60, self.RULE_whileStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 424 + self.state = 428 self.match(PyNestMLParser.WHILE_KEYWORD) - self.state = 425 + self.state = 429 self.expression(0) - self.state = 426 + self.state = 430 self.match(PyNestMLParser.COLON) - self.state = 427 + self.state = 431 self.block() except RecognitionException as re: localctx.exception = re @@ -3137,31 +3170,31 @@ def nestMLCompilationUnit(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 431 + self.state = 435 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 431 + self.state = 435 self._errHandler.sync(self) token = self._input.LA(1) - if token in [31]: - self.state = 429 + if token in [PyNestMLParser.MODEL_KEYWORD]: + self.state = 433 self.model() pass - elif token in [9]: - self.state = 430 + elif token in [PyNestMLParser.NEWLINE]: + self.state = 434 self.match(PyNestMLParser.NEWLINE) pass else: raise NoViableAltException(self) - self.state = 433 + self.state = 437 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==9 or _la==31): + if not (_la==PyNestMLParser.NEWLINE or _la==PyNestMLParser.MODEL_KEYWORD): break - self.state = 435 + self.state = 439 self.match(PyNestMLParser.EOF) except RecognitionException as re: localctx.exception = re @@ -3207,11 +3240,11 @@ def model(self): self.enterRule(localctx, 64, self.RULE_model) try: self.enterOuterAlt(localctx, 1) - self.state = 437 + self.state = 441 self.match(PyNestMLParser.MODEL_KEYWORD) - self.state = 438 + self.state = 442 self.match(PyNestMLParser.NAME) - self.state = 439 + self.state = 443 self.modelBody() except RecognitionException as re: localctx.exception = re @@ -3316,61 +3349,61 @@ def modelBody(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 441 + self.state = 445 self.match(PyNestMLParser.COLON) - self.state = 442 + self.state = 446 self.match(PyNestMLParser.NEWLINE) - self.state = 443 + self.state = 447 self.match(PyNestMLParser.INDENT) - self.state = 452 + self.state = 456 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 452 + self.state = 456 self._errHandler.sync(self) token = self._input.LA(1) - if token in [32, 33, 34]: - self.state = 444 + if token in [PyNestMLParser.STATE_KEYWORD, PyNestMLParser.PARAMETERS_KEYWORD, PyNestMLParser.INTERNALS_KEYWORD]: + self.state = 448 self.blockWithVariables() pass - elif token in [36]: - self.state = 445 + elif token in [PyNestMLParser.EQUATIONS_KEYWORD]: + self.state = 449 self.equationsBlock() pass - elif token in [37]: - self.state = 446 + elif token in [PyNestMLParser.INPUT_KEYWORD]: + self.state = 450 self.inputBlock() pass - elif token in [38]: - self.state = 447 + elif token in [PyNestMLParser.OUTPUT_KEYWORD]: + self.state = 451 self.outputBlock() pass - elif token in [15]: - self.state = 448 + elif token in [PyNestMLParser.FUNCTION_KEYWORD]: + self.state = 452 self.function() pass - elif token in [40]: - self.state = 449 + elif token in [PyNestMLParser.ON_RECEIVE_KEYWORD]: + self.state = 453 self.onReceiveBlock() pass - elif token in [41]: - self.state = 450 + elif token in [PyNestMLParser.ON_CONDITION_KEYWORD]: + self.state = 454 self.onConditionBlock() pass - elif token in [35]: - self.state = 451 + elif token in [PyNestMLParser.UPDATE_KEYWORD]: + self.state = 455 self.updateBlock() pass else: raise NoViableAltException(self) - self.state = 454 + self.state = 458 self._errHandler.sync(self) _la = self._input.LA(1) - if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 3843995762688) != 0)): + if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.FUNCTION_KEYWORD) | (1 << PyNestMLParser.STATE_KEYWORD) | (1 << PyNestMLParser.PARAMETERS_KEYWORD) | (1 << PyNestMLParser.INTERNALS_KEYWORD) | (1 << PyNestMLParser.UPDATE_KEYWORD) | (1 << PyNestMLParser.EQUATIONS_KEYWORD) | (1 << PyNestMLParser.INPUT_KEYWORD) | (1 << PyNestMLParser.OUTPUT_KEYWORD) | (1 << PyNestMLParser.ON_RECEIVE_KEYWORD) | (1 << PyNestMLParser.ON_CONDITION_KEYWORD))) != 0)): break - self.state = 456 + self.state = 460 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3440,29 +3473,29 @@ def onReceiveBlock(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 458 + self.state = 462 self.match(PyNestMLParser.ON_RECEIVE_KEYWORD) - self.state = 459 + self.state = 463 self.match(PyNestMLParser.LEFT_PAREN) - self.state = 460 + self.state = 464 localctx.inputPortName = self.match(PyNestMLParser.NAME) - self.state = 465 + self.state = 469 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==74: - self.state = 461 + while _la==PyNestMLParser.COMMA: + self.state = 465 self.match(PyNestMLParser.COMMA) - self.state = 462 + self.state = 466 self.constParameter() - self.state = 467 + self.state = 471 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 468 + self.state = 472 self.match(PyNestMLParser.RIGHT_PAREN) - self.state = 469 + self.state = 473 self.match(PyNestMLParser.COLON) - self.state = 470 + self.state = 474 self.block() except RecognitionException as re: localctx.exception = re @@ -3533,29 +3566,29 @@ def onConditionBlock(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 472 + self.state = 476 self.match(PyNestMLParser.ON_CONDITION_KEYWORD) - self.state = 473 + self.state = 477 self.match(PyNestMLParser.LEFT_PAREN) - self.state = 474 + self.state = 478 localctx.condition = self.expression(0) - self.state = 479 + self.state = 483 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==74: - self.state = 475 + while _la==PyNestMLParser.COMMA: + self.state = 479 self.match(PyNestMLParser.COMMA) - self.state = 476 + self.state = 480 self.constParameter() - self.state = 481 + self.state = 485 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 482 + self.state = 486 self.match(PyNestMLParser.RIGHT_PAREN) - self.state = 483 + self.state = 487 self.match(PyNestMLParser.COLON) - self.state = 484 + self.state = 488 self.block() except RecognitionException as re: localctx.exception = re @@ -3621,33 +3654,33 @@ def blockWithVariables(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 486 + self.state = 490 localctx.blockType = self._input.LT(1) _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 30064771072) != 0)): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.STATE_KEYWORD) | (1 << PyNestMLParser.PARAMETERS_KEYWORD) | (1 << PyNestMLParser.INTERNALS_KEYWORD))) != 0)): localctx.blockType = self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 487 + self.state = 491 self.match(PyNestMLParser.COLON) - self.state = 488 + self.state = 492 self.match(PyNestMLParser.NEWLINE) - self.state = 489 + self.state = 493 self.match(PyNestMLParser.INDENT) - self.state = 491 + self.state = 495 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 490 + self.state = 494 self.declaration_newline() - self.state = 493 + self.state = 497 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==16 or _la==29 or _la==88): + if not (_la==PyNestMLParser.INLINE_KEYWORD or _la==PyNestMLParser.RECORDABLE_KEYWORD or _la==PyNestMLParser.NAME): break - self.state = 495 + self.state = 499 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3693,11 +3726,11 @@ def updateBlock(self): self.enterRule(localctx, 74, self.RULE_updateBlock) try: self.enterOuterAlt(localctx, 1) - self.state = 497 + self.state = 501 self.match(PyNestMLParser.UPDATE_KEYWORD) - self.state = 498 + self.state = 502 self.match(PyNestMLParser.COLON) - self.state = 499 + self.state = 503 self.block() except RecognitionException as re: localctx.exception = re @@ -3770,43 +3803,43 @@ def equationsBlock(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 501 + self.state = 505 self.match(PyNestMLParser.EQUATIONS_KEYWORD) - self.state = 502 + self.state = 506 self.match(PyNestMLParser.COLON) - self.state = 503 + self.state = 507 self.match(PyNestMLParser.NEWLINE) - self.state = 504 + self.state = 508 self.match(PyNestMLParser.INDENT) - self.state = 508 + self.state = 512 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 508 + self.state = 512 self._errHandler.sync(self) token = self._input.LA(1) - if token in [16, 29]: - self.state = 505 + if token in [PyNestMLParser.INLINE_KEYWORD, PyNestMLParser.RECORDABLE_KEYWORD]: + self.state = 509 self.inlineExpression() pass - elif token in [88]: - self.state = 506 + elif token in [PyNestMLParser.NAME]: + self.state = 510 self.odeEquation() pass - elif token in [30]: - self.state = 507 + elif token in [PyNestMLParser.KERNEL_KEYWORD]: + self.state = 511 self.kernel() pass else: raise NoViableAltException(self) - self.state = 510 + self.state = 514 self._errHandler.sync(self) _la = self._input.LA(1) - if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 1610678272) != 0) or _la==88): + if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INLINE_KEYWORD) | (1 << PyNestMLParser.RECORDABLE_KEYWORD) | (1 << PyNestMLParser.KERNEL_KEYWORD))) != 0) or _la==PyNestMLParser.NAME): break - self.state = 512 + self.state = 516 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3853,6 +3886,31 @@ def continuousInputPort(self, i:int=None): return self.getTypedRuleContext(PyNestMLParser.ContinuousInputPortContext,i) + def LEFT_PAREN(self, i:int=None): + if i is None: + return self.getTokens(PyNestMLParser.LEFT_PAREN) + else: + return self.getToken(PyNestMLParser.LEFT_PAREN, i) + + def RIGHT_PAREN(self, i:int=None): + if i is None: + return self.getTokens(PyNestMLParser.RIGHT_PAREN) + else: + return self.getToken(PyNestMLParser.RIGHT_PAREN, i) + + def parameter(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(PyNestMLParser.ParameterContext) + else: + return self.getTypedRuleContext(PyNestMLParser.ParameterContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(PyNestMLParser.COMMA) + else: + return self.getToken(PyNestMLParser.COMMA, i) + def getRuleIndex(self): return PyNestMLParser.RULE_inputBlock @@ -3872,39 +3930,69 @@ def inputBlock(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 514 + self.state = 518 self.match(PyNestMLParser.INPUT_KEYWORD) - self.state = 515 + self.state = 519 self.match(PyNestMLParser.COLON) - self.state = 516 + self.state = 520 self.match(PyNestMLParser.NEWLINE) - self.state = 517 + self.state = 521 self.match(PyNestMLParser.INDENT) - self.state = 520 + self.state = 540 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 520 + self.state = 524 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,53,self._ctx) + la_ = self._interp.adaptivePredict(self._input,54,self._ctx) if la_ == 1: - self.state = 518 + self.state = 522 self.spikeInputPort() pass elif la_ == 2: - self.state = 519 + self.state = 523 self.continuousInputPort() pass - self.state = 522 + self.state = 538 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==88): + if _la==PyNestMLParser.LEFT_PAREN: + self.state = 526 + self.match(PyNestMLParser.LEFT_PAREN) + self.state = 535 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==PyNestMLParser.NAME: + self.state = 527 + self.parameter() + self.state = 532 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==PyNestMLParser.COMMA: + self.state = 528 + self.match(PyNestMLParser.COMMA) + self.state = 529 + self.parameter() + self.state = 534 + self._errHandler.sync(self) + _la = self._input.LA(1) + + + + self.state = 537 + self.match(PyNestMLParser.RIGHT_PAREN) + + + self.state = 542 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==PyNestMLParser.NAME): break - self.state = 524 + self.state = 544 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -3972,35 +4060,35 @@ def spikeInputPort(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 526 + self.state = 546 localctx.name = self.match(PyNestMLParser.NAME) - self.state = 531 + self.state = 551 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==56: - self.state = 527 + if _la==PyNestMLParser.LEFT_SQUARE_BRACKET: + self.state = 547 self.match(PyNestMLParser.LEFT_SQUARE_BRACKET) - self.state = 528 + self.state = 548 localctx.sizeParameter = self.expression(0) - self.state = 529 + self.state = 549 self.match(PyNestMLParser.RIGHT_SQUARE_BRACKET) - self.state = 533 + self.state = 553 self.match(PyNestMLParser.LEFT_ANGLE_MINUS) - self.state = 537 + self.state = 557 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==43 or _la==44: - self.state = 534 + while _la==PyNestMLParser.INHIBITORY_KEYWORD or _la==PyNestMLParser.EXCITATORY_KEYWORD: + self.state = 554 self.inputQualifier() - self.state = 539 + self.state = 559 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 540 + self.state = 560 self.match(PyNestMLParser.SPIKE_KEYWORD) - self.state = 541 + self.state = 561 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -4065,27 +4153,27 @@ def continuousInputPort(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 543 + self.state = 563 localctx.name = self.match(PyNestMLParser.NAME) - self.state = 548 + self.state = 568 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==56: - self.state = 544 + if _la==PyNestMLParser.LEFT_SQUARE_BRACKET: + self.state = 564 self.match(PyNestMLParser.LEFT_SQUARE_BRACKET) - self.state = 545 + self.state = 565 localctx.sizeParameter = self.expression(0) - self.state = 546 + self.state = 566 self.match(PyNestMLParser.RIGHT_SQUARE_BRACKET) - self.state = 550 + self.state = 570 self.dataType() - self.state = 551 + self.state = 571 self.match(PyNestMLParser.LEFT_ANGLE_MINUS) - self.state = 552 + self.state = 572 self.match(PyNestMLParser.CONTINUOUS_KEYWORD) - self.state = 553 + self.state = 573 self.match(PyNestMLParser.NEWLINE) except RecognitionException as re: localctx.exception = re @@ -4129,15 +4217,15 @@ def inputQualifier(self): self.enterRule(localctx, 84, self.RULE_inputQualifier) try: self.enterOuterAlt(localctx, 1) - self.state = 557 + self.state = 577 self._errHandler.sync(self) token = self._input.LA(1) - if token in [43]: - self.state = 555 + if token in [PyNestMLParser.INHIBITORY_KEYWORD]: + self.state = 575 localctx.isInhibitory = self.match(PyNestMLParser.INHIBITORY_KEYWORD) pass - elif token in [44]: - self.state = 556 + elif token in [PyNestMLParser.EXCITATORY_KEYWORD]: + self.state = 576 localctx.isExcitatory = self.match(PyNestMLParser.EXCITATORY_KEYWORD) pass else: @@ -4160,6 +4248,7 @@ def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): self.parser = parser self.isSpike = None # Token self.isContinuous = None # Token + self.attribute = None # ParameterContext def OUTPUT_KEYWORD(self): return self.getToken(PyNestMLParser.OUTPUT_KEYWORD, 0) @@ -4185,6 +4274,25 @@ def SPIKE_KEYWORD(self): def CONTINUOUS_KEYWORD(self): return self.getToken(PyNestMLParser.CONTINUOUS_KEYWORD, 0) + def LEFT_PAREN(self): + return self.getToken(PyNestMLParser.LEFT_PAREN, 0) + + def RIGHT_PAREN(self): + return self.getToken(PyNestMLParser.RIGHT_PAREN, 0) + + def parameter(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(PyNestMLParser.ParameterContext) + else: + return self.getTypedRuleContext(PyNestMLParser.ParameterContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(PyNestMLParser.COMMA) + else: + return self.getToken(PyNestMLParser.COMMA, i) + def getRuleIndex(self): return PyNestMLParser.RULE_outputBlock @@ -4201,33 +4309,64 @@ def outputBlock(self): localctx = PyNestMLParser.OutputBlockContext(self, self._ctx, self.state) self.enterRule(localctx, 86, self.RULE_outputBlock) + self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 559 + self.state = 579 self.match(PyNestMLParser.OUTPUT_KEYWORD) - self.state = 560 + self.state = 580 self.match(PyNestMLParser.COLON) - self.state = 561 + self.state = 581 self.match(PyNestMLParser.NEWLINE) - self.state = 562 + self.state = 582 self.match(PyNestMLParser.INDENT) - self.state = 565 + self.state = 585 self._errHandler.sync(self) token = self._input.LA(1) - if token in [42]: - self.state = 563 + if token in [PyNestMLParser.SPIKE_KEYWORD]: + self.state = 583 localctx.isSpike = self.match(PyNestMLParser.SPIKE_KEYWORD) pass - elif token in [39]: - self.state = 564 + elif token in [PyNestMLParser.CONTINUOUS_KEYWORD]: + self.state = 584 localctx.isContinuous = self.match(PyNestMLParser.CONTINUOUS_KEYWORD) pass else: raise NoViableAltException(self) - self.state = 567 + self.state = 599 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==PyNestMLParser.LEFT_PAREN: + self.state = 587 + self.match(PyNestMLParser.LEFT_PAREN) + self.state = 596 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==PyNestMLParser.NAME: + self.state = 588 + localctx.attribute = self.parameter() + self.state = 593 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==PyNestMLParser.COMMA: + self.state = 589 + self.match(PyNestMLParser.COMMA) + self.state = 590 + localctx.attribute = self.parameter() + self.state = 595 + self._errHandler.sync(self) + _la = self._input.LA(1) + + + + self.state = 598 + self.match(PyNestMLParser.RIGHT_PAREN) + + + self.state = 601 self.match(PyNestMLParser.NEWLINE) - self.state = 568 + self.state = 602 self.match(PyNestMLParser.DEDENT) except RecognitionException as re: localctx.exception = re @@ -4301,45 +4440,45 @@ def function(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 570 + self.state = 604 self.match(PyNestMLParser.FUNCTION_KEYWORD) - self.state = 571 + self.state = 605 self.match(PyNestMLParser.NAME) - self.state = 572 + self.state = 606 self.match(PyNestMLParser.LEFT_PAREN) - self.state = 581 + self.state = 615 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==88: - self.state = 573 + if _la==PyNestMLParser.NAME: + self.state = 607 self.parameter() - self.state = 578 + self.state = 612 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==74: - self.state = 574 + while _la==PyNestMLParser.COMMA: + self.state = 608 self.match(PyNestMLParser.COMMA) - self.state = 575 + self.state = 609 self.parameter() - self.state = 580 + self.state = 614 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 583 + self.state = 617 self.match(PyNestMLParser.RIGHT_PAREN) - self.state = 585 + self.state = 619 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 562949953453056) != 0) or _la==88 or _la==89: - self.state = 584 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << PyNestMLParser.INTEGER_KEYWORD) | (1 << PyNestMLParser.REAL_KEYWORD) | (1 << PyNestMLParser.STRING_KEYWORD) | (1 << PyNestMLParser.BOOLEAN_KEYWORD) | (1 << PyNestMLParser.VOID_KEYWORD) | (1 << PyNestMLParser.LEFT_PAREN))) != 0) or _la==PyNestMLParser.NAME or _la==PyNestMLParser.UNSIGNED_INTEGER: + self.state = 618 localctx.returnType = self.dataType() - self.state = 587 + self.state = 621 self.match(PyNestMLParser.COLON) - self.state = 588 + self.state = 622 self.block() except RecognitionException as re: localctx.exception = re @@ -4382,9 +4521,9 @@ def parameter(self): self.enterRule(localctx, 90, self.RULE_parameter) try: self.enterOuterAlt(localctx, 1) - self.state = 590 + self.state = 624 self.match(PyNestMLParser.NAME) - self.state = 591 + self.state = 625 self.dataType() except RecognitionException as re: localctx.exception = re @@ -4444,14 +4583,14 @@ def constParameter(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 593 + self.state = 627 localctx.name = self.match(PyNestMLParser.NAME) - self.state = 594 + self.state = 628 self.match(PyNestMLParser.EQUALS) - self.state = 595 + self.state = 629 localctx.value = self._input.LT(1) _la = self._input.LA(1) - if not(_la==25 or ((((_la - 86)) & ~0x3f) == 0 and ((1 << (_la - 86)) & 27) != 0)): + if not(_la==PyNestMLParser.INF_KEYWORD or ((((_la - 87)) & ~0x3f) == 0 and ((1 << (_la - 87)) & ((1 << (PyNestMLParser.BOOLEAN_LITERAL - 87)) | (1 << (PyNestMLParser.STRING_LITERAL - 87)) | (1 << (PyNestMLParser.UNSIGNED_INTEGER - 87)) | (1 << (PyNestMLParser.FLOAT - 87)))) != 0)): localctx.value = self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) diff --git a/pynestml/generated/PyNestMLParserVisitor.py b/pynestml/generated/PyNestMLParserVisitor.py index 4f9cbf508..b66a05306 100644 --- a/pynestml/generated/PyNestMLParserVisitor.py +++ b/pynestml/generated/PyNestMLParserVisitor.py @@ -1,6 +1,6 @@ -# Generated from PyNestMLParser.g4 by ANTLR 4.13.1 +# Generated from PyNestMLParser.g4 by ANTLR 4.10.1 from antlr4 import * -if "." in __name__: +if __name__ is not None and "." in __name__: from .PyNestMLParser import PyNestMLParser else: from PyNestMLParser import PyNestMLParser diff --git a/pynestml/grammars/PyNestMLLexer.g4 b/pynestml/grammars/PyNestMLLexer.g4 index c7255e807..b5e36be4f 100644 --- a/pynestml/grammars/PyNestMLLexer.g4 +++ b/pynestml/grammars/PyNestMLLexer.g4 @@ -138,6 +138,7 @@ lexer grammar PyNestMLLexer; DOUBLE_COLON : '::'; SEMICOLON : ';'; DIFFERENTIAL_ORDER : '\''; + FULLSTOP : '.'; /** @@ -174,8 +175,8 @@ lexer grammar PyNestMLLexer; FLOAT : POINT_FLOAT | EXPONENT_FLOAT; - fragment POINT_FLOAT : UNSIGNED_INTEGER? '.' UNSIGNED_INTEGER - | UNSIGNED_INTEGER '.' + fragment POINT_FLOAT : UNSIGNED_INTEGER? FULLSTOP UNSIGNED_INTEGER + | UNSIGNED_INTEGER FULLSTOP ; fragment EXPONENT_FLOAT: ( UNSIGNED_INTEGER | POINT_FLOAT ) [eE] EXPONENT ; diff --git a/pynestml/grammars/PyNestMLParser.g4 b/pynestml/grammars/PyNestMLParser.g4 index 5d2af2d50..9a0618561 100644 --- a/pynestml/grammars/PyNestMLParser.g4 +++ b/pynestml/grammars/PyNestMLParser.g4 @@ -108,7 +108,8 @@ parser grammar PyNestMLParser; */ variable : name=NAME (LEFT_SQUARE_BRACKET vectorParameter=expression RIGHT_SQUARE_BRACKET)? - (DIFFERENTIAL_ORDER)*; + (DIFFERENTIAL_ORDER)* + (FULLSTOP attribute=variable)?; /** ASTFunctionCall Represents a function call, e.g. myFun("a", "b"). @@ -284,7 +285,7 @@ parser grammar PyNestMLParser; @attribute inputPort: A list of input ports. */ inputBlock: INPUT_KEYWORD COLON - NEWLINE INDENT (spikeInputPort | continuousInputPort)+ DEDENT; + NEWLINE INDENT ((spikeInputPort | continuousInputPort) (LEFT_PAREN (parameter (COMMA parameter)*)? RIGHT_PAREN)?)+ DEDENT; /** ASTInputPort represents a single input port, e.g.: spike_in[3] <- excitatory spike @@ -322,7 +323,9 @@ parser grammar PyNestMLParser; @attribute isContinuous: true if and only if the neuron has a continuous-time output. */ outputBlock: OUTPUT_KEYWORD COLON - NEWLINE INDENT (isSpike=SPIKE_KEYWORD | isContinuous=CONTINUOUS_KEYWORD) NEWLINE DEDENT; + NEWLINE INDENT (isSpike=SPIKE_KEYWORD | isContinuous=CONTINUOUS_KEYWORD) + (LEFT_PAREN (attribute=parameter (COMMA attribute=parameter)*)? RIGHT_PAREN)? + NEWLINE DEDENT; /** ASTFunction A single declaration of a user-defined function definition: function set_V_m(v mV): diff --git a/pynestml/meta_model/ast_function_call.py b/pynestml/meta_model/ast_function_call.py index a078e188a..a07c3483a 100644 --- a/pynestml/meta_model/ast_function_call.py +++ b/pynestml/meta_model/ast_function_call.py @@ -22,6 +22,7 @@ from typing import List from pynestml.meta_model.ast_node import ASTNode +from pynestml.meta_model.ast_parameter import ASTParameter class ASTFunctionCall(ASTNode): @@ -91,12 +92,14 @@ def has_args(self): """ return (self.args is not None) and len(self.args) > 0 - def get_args(self): + def get_args(self) -> List[ASTParameter]: """ Returns the list of arguments. :return: the list of arguments. - :rtype: list(ASTExpression) """ + if self.args is None: + return [] + return self.args def get_children(self) -> List[ASTNode]: diff --git a/pynestml/meta_model/ast_node_factory.py b/pynestml/meta_model/ast_node_factory.py index da3986be9..781d75f9e 100644 --- a/pynestml/meta_model/ast_node_factory.py +++ b/pynestml/meta_model/ast_node_factory.py @@ -19,7 +19,7 @@ # You should have received a copy of the GNU General Public License # along with NEST. If not, see . -from typing import Optional, Union +from typing import List, Optional, Union from pynestml.meta_model.ast_arithmetic_operator import ASTArithmeticOperator from pynestml.meta_model.ast_assignment import ASTAssignment @@ -295,9 +295,8 @@ def create_ast_kernel(cls, variables=None, expressions=None, source_position=Non return ASTKernel(variables, expressions, source_position=source_position) @classmethod - def create_ast_output_block(cls, s_type, source_position): - # type: (PortSignalType,ASTSourceLocation) -> ASTOutputBlock - return ASTOutputBlock(s_type, source_position=source_position) + def create_ast_output_block(cls, s_type: PortSignalType, attributes: Optional[List[ASTParameter]] = None, source_position: ASTSourceLocation = None) -> ASTOutputBlock: + return ASTOutputBlock(s_type, attributes=attributes, source_position=source_position) @classmethod def create_ast_parameter(cls, name, data_type, source_position): diff --git a/pynestml/meta_model/ast_output_block.py b/pynestml/meta_model/ast_output_block.py index 66a61f71d..33cf33245 100644 --- a/pynestml/meta_model/ast_output_block.py +++ b/pynestml/meta_model/ast_output_block.py @@ -19,9 +19,10 @@ # You should have received a copy of the GNU General Public License # along with NEST. If not, see . -from typing import List +from typing import List, Optional from pynestml.meta_model.ast_node import ASTNode +from pynestml.meta_model.ast_parameter import ASTParameter from pynestml.utils.port_signal_type import PortSignalType @@ -39,7 +40,7 @@ class ASTOutputBlock(ASTNode): type = None """ - def __init__(self, o_type, *args, **kwargs): + def __init__(self, o_type, attributes: Optional[List[ASTParameter]], *args, **kwargs): """ Standard constructor. @@ -51,6 +52,7 @@ def __init__(self, o_type, *args, **kwargs): assert isinstance(o_type, PortSignalType) super(ASTOutputBlock, self).__init__(*args, **kwargs) self.type = o_type + self.attributes = attributes def clone(self): """ @@ -60,6 +62,7 @@ def clone(self): :rtype: ASTOutputBlock """ dup = ASTOutputBlock(o_type=self.type, + attributes=self.attributes, # ASTNode common attributes: source_position=self.source_position, scope=self.scope, @@ -84,6 +87,16 @@ def is_continuous(self) -> bool: """ return self.type is PortSignalType.CONTINUOUS + def get_attributes(self) -> List[ASTParameter]: + r""" + Returns the attributes of this node, if any. + :return: List of attributes of this node. + """ + if self.attributes is None: + return [] + + return self.attributes + def get_children(self) -> List[ASTNode]: r""" Returns the children of this node, if any. @@ -98,4 +111,11 @@ def equals(self, other: ASTNode) -> bool: if not isinstance(other, ASTOutputBlock): return False + if bool(self.attributes) != bool(other.attributes): + return False + + for attribute_self, attribute_other in zip(self.attributes, other.attributes): + if not attribute_self.equals(attribute_other): + return False + return self.is_spike() == other.is_spike() and self.is_continuous() == other.is_continuous() diff --git a/pynestml/utils/messages.py b/pynestml/utils/messages.py index bb8914dd6..22f9242cd 100644 --- a/pynestml/utils/messages.py +++ b/pynestml/utils/messages.py @@ -139,6 +139,7 @@ class MessageCode(Enum): TIMESTEP_FUNCTION_LEGALLY_USED = 113 RANDOM_FUNCTIONS_LEGALLY_USED = 113 EXPONENT_MUST_BE_INTEGER = 114 + EMIT_SPIKE_OUTPUT_PORT_TYPE_DIFFERS = 115 class Messages: @@ -1073,6 +1074,14 @@ def get_emit_spike_function_but_no_output_port(cls): message = 'emit_spike() function was called, but no spiking output port has been defined!' return MessageCode.EMIT_SPIKE_FUNCTION_BUT_NO_OUTPUT_PORT, message + @classmethod + def get_output_port_type_differs(cls) -> Tuple[MessageCode, str]: + """ + Indicates that an emit_spike() function was called, but with different parameter types than the output port was defined with. + """ + message = 'emit_spike() function was called, but with different parameter types than the output port was defined with!' + return MessageCode.EMIT_SPIKE_OUTPUT_PORT_TYPE_DIFFERS, message + @classmethod def get_kernel_wrong_type(cls, kernel_name: str, diff --git a/pynestml/visitors/ast_builder_visitor.py b/pynestml/visitors/ast_builder_visitor.py index bfc4dd902..02a9bd396 100644 --- a/pynestml/visitors/ast_builder_visitor.py +++ b/pynestml/visitors/ast_builder_visitor.py @@ -644,13 +644,21 @@ def visitInputQualifier(self, ctx): # Visit a parse tree produced by PyNESTMLParser#outputBuffer. def visitOutputBlock(self, ctx): source_pos = create_source_pos(ctx) + attributes: List[ASTParameter] = [] + if ctx.parameter() is not None: + if type(ctx.parameter()) is list: + for par in ctx.parameter(): + attributes.append(self.visit(par)) + else: + attributes.append(self.visit(ctx.parameter())) + if ctx.isSpike is not None: - ret = ASTNodeFactory.create_ast_output_block(s_type=PortSignalType.SPIKE, source_position=source_pos) + ret = ASTNodeFactory.create_ast_output_block(s_type=PortSignalType.SPIKE, attributes=attributes, source_position=source_pos) update_node_comments(ret, self.__comments.visit(ctx)) return ret if ctx.isContinuous is not None: - ret = ASTNodeFactory.create_ast_output_block(s_type=PortSignalType.CONTINUOUS, source_position=source_pos) + ret = ASTNodeFactory.create_ast_output_block(s_type=PortSignalType.CONTINUOUS, attributes=attributes, source_position=source_pos) update_node_comments(ret, self.__comments.visit(ctx)) return ret diff --git a/tests/invalid/CoCoOutputPortTypeIfEmitCall-2.nestml b/tests/invalid/CoCoOutputPortTypeIfEmitCall-2.nestml new file mode 100644 index 000000000..c8ddcbdc6 --- /dev/null +++ b/tests/invalid/CoCoOutputPortTypeIfEmitCall-2.nestml @@ -0,0 +1,37 @@ +""" +CoCoOutputPortTypeIfEmitCall.nestml +################################### + + +Description ++++++++++++ + +This model is used to test if broken CoCos are identified correctly. Here, test that an error is raised when the emit_spike() function is called with different parameter types than are defined in the spiking output port. + + +Copyright statement ++++++++++++++++++++ + +This file is part of NEST. + +Copyright (C) 2004 The NEST Initiative + +NEST is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +NEST is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with NEST. If not, see . +""" +model output_port_types_neuron: + output: + spike(foo real) + + update: + emit_spike() diff --git a/tests/invalid/CoCoOutputPortTypeIfEmitCall-3.nestml b/tests/invalid/CoCoOutputPortTypeIfEmitCall-3.nestml new file mode 100644 index 000000000..0e3c5a26f --- /dev/null +++ b/tests/invalid/CoCoOutputPortTypeIfEmitCall-3.nestml @@ -0,0 +1,37 @@ +""" +CoCoOutputPortTypeIfEmitCall.nestml +################################### + + +Description ++++++++++++ + +This model is used to test if broken CoCos are identified correctly. Here, test that an error is raised when the emit_spike() function is called with different parameter types than are defined in the spiking output port. + + +Copyright statement ++++++++++++++++++++ + +This file is part of NEST. + +Copyright (C) 2004 The NEST Initiative + +NEST is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +NEST is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with NEST. If not, see . +""" +model output_port_types_neuron: + output: + spike(foo real) + + update: + emit_spike(1 ms) diff --git a/tests/invalid/CoCoOutputPortTypeIfEmitCall.nestml b/tests/invalid/CoCoOutputPortTypeIfEmitCall.nestml new file mode 100644 index 000000000..d9fc459f0 --- /dev/null +++ b/tests/invalid/CoCoOutputPortTypeIfEmitCall.nestml @@ -0,0 +1,37 @@ +""" +CoCoOutputPortTypeIfEmitCall.nestml +################################### + + +Description ++++++++++++ + +This model is used to test if broken CoCos are identified correctly. Here, test that an error is raised when the emit_spike() function is called with different parameter types than are defined in the spiking output port. + + +Copyright statement ++++++++++++++++++++ + +This file is part of NEST. + +Copyright (C) 2004 The NEST Initiative + +NEST is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +NEST is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with NEST. If not, see . +""" +model output_port_types_neuron: + output: + spike + + update: + emit_spike(1 ms) diff --git a/tests/test_cocos.py b/tests/test_cocos.py index 731fb8d8a..20b8cd369 100644 --- a/tests/test_cocos.py +++ b/tests/test_cocos.py @@ -115,7 +115,7 @@ def test_valid_function_unique_and_defined(self): def test_invalid_inline_expressions_have_rhs(self): model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), 'CoCoInlineExpressionHasNoRhs.nestml')) - assert model is None + assert model is None # parse error def test_valid_inline_expressions_have_rhs(self): model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'valid')), 'CoCoInlineExpressionHasNoRhs.nestml')) @@ -123,7 +123,7 @@ def test_valid_inline_expressions_have_rhs(self): def test_invalid_inline_expression_has_several_lhs(self): model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), 'CoCoInlineExpressionWithSeveralLhs.nestml')) - assert model is None + assert model is None # parse error def test_valid_inline_expression_has_several_lhs(self): model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'valid')), 'CoCoInlineExpressionWithSeveralLhs.nestml')) @@ -324,6 +324,23 @@ def test_valid_output_port_defined_if_emit_call(self): model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'valid')), 'CoCoOutputPortDefinedIfEmitCall.nestml')) assert len(Logger.get_all_messages_of_level_and_or_node(model, LoggingLevel.ERROR)) == 0 + def test_invalid_output_port_type_if_emit_call(self): + """test that an error is raised when the emit_spike() function is called with different parameter types than are defined in the spiking output port""" + model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), 'CoCoOutputPortTypeIfEmitCall.nestml')) + assert len(Logger.get_all_messages_of_level_and_or_node(model, LoggingLevel.ERROR)) > 0 + + def test_invalid_output_port_type_if_emit_call(self): + """test that an error is raised when the emit_spike() function is called with different parameter types than are defined in the spiking output port""" + model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), 'CoCoOutputPortTypeIfEmitCall-2.nestml')) + assert len(Logger.get_all_messages_of_level_and_or_node(model, LoggingLevel.ERROR)) > 0 + + def test_valid_output_port_type_if_emit_call(self): + """test that an error is raised when the emit_spike() function is called with different parameter types than are defined in the spiking output port""" + model = self._parse_and_validate_model(os.path.join(os.path.realpath(os.path.join(os.path.dirname(__file__), 'invalid')), 'CoCoOutputPortTypeIfEmitCall-3.nestml')) + assert model is not None + assert len(Logger.get_all_messages_of_level_and_or_node(model, LoggingLevel.ERROR)) == 0 + assert len(Logger.get_all_messages_of_level_and_or_node(model, LoggingLevel.WARNING)) > 0 + def test_valid_coco_kernel_type(self): """ Test the functionality of CoCoKernelType. @@ -388,10 +405,7 @@ def _parse_and_validate_model(self, fname: str) -> Optional[str]: Logger.init_logger(LoggingLevel.DEBUG) - try: - generate_target(input_path=fname, target_platform="NONE", logging_level="DEBUG") - except BaseException: - return None + generate_target(input_path=fname, target_platform="NONE", logging_level="DEBUG") ast_compilation_unit = ModelParser.parse_file(fname) if ast_compilation_unit is None or len(ast_compilation_unit.get_model_list()) == 0: