From cc7a86b8f23f58b2c3c513bd529944b89f4f8803 Mon Sep 17 00:00:00 2001 From: bogachev-pa Date: Wed, 27 Aug 2014 20:56:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BA=D0=BE?= =?UTF-8?q?=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD=D0=BE=D0=B9=20=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BF=D1=8B=D1=82=D0=BA=D0=B5=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B4=D0=B5=D1=84=D0=BE=D0=BB=D1=82=D0=BD=D0=BE=D0=B5?= =?UTF-8?q?=20=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2?= =?UTF-8?q?=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=BD=D0=BE=D0=BC=D1=83=20=D1=80?= =?UTF-8?q?=D0=B5=D1=81=D1=83=D1=80=D1=81=D1=83=20(#21)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simulator/compiler/parser/grammar/rdoevn.yx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/simulator/compiler/parser/grammar/rdoevn.yx b/simulator/compiler/parser/grammar/rdoevn.yx index 871123d3b..016ae2016 100644 --- a/simulator/compiler/parser/grammar/rdoevn.yx +++ b/simulator/compiler/parser/grammar/rdoevn.yx @@ -959,7 +959,7 @@ rss_resource ; rss_constructor_call - : rss_constructor_name '(' rss_opt_value_list ')' + : rss_constructor_name rss_opt_value_list ')' { #PASS2 { @@ -968,7 +968,7 @@ rss_constructor_call if (!pResource->defined()) { - PARSER->error().error(@3, rdo::format("Заданы не все параметры ресурса: '%s'", pResource->name().c_str())); + PARSER->error().error(@2, rdo::format("Заданы не все параметры ресурса: '%s'", pResource->name().c_str())); } pResource->end(); $$ = PARSER->stack().push(pResource); @@ -977,7 +977,7 @@ rss_constructor_call ; rss_constructor_name - : RDO_IDENTIF + : RDO_IDENTIF '(' { #PASS2 { @@ -10501,6 +10501,10 @@ param_value_default { $$ = $2; } + | '=' rss_constructor_call + { + PARSER->error().error(@2, "Для вложенных ресурсов нельзя задавать значение по умолчанию"); + } | '=' error { RDOParserSrcInfo src_info(@1, @2, true); @@ -10723,7 +10727,7 @@ param_full_name Context::Params params = pParentResult->getSwitchContext().params; params[Context::Params::IDENTIFIER] = pName->value().getIdentificator(); Context::LPFindResult result = pParentContext->find(Context::METHOD_OPERATOR_DOT, params, pName->src_info()); - + $$ = PARSER->stack().push(result); } }