Project

General

Profile

Bug #5028

Не обрабатывается конструкция repeat

Added by Alexander Kamkin over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
07/07/2014
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
r322

Description

3)Repeat: при добавлении любой конструкции repeat программа падает, например

    Вход: repeat(2) begin
            a = b;
          end
    Выход: программа падает.
    Ожидаемый выход: repeat(2) begin
                       a = b;
                     end

History

#1

Updated by Alexander Kamkin over 5 years ago

  • Project changed from Retrascope to Verilog Translator
  • Target version deleted (0.1)
#2

Updated by Alexander Kamkin over 5 years ago

  • Status changed from New to Resolved
  • Target version set to 0.1
  • Published in build set to r322

Проблема касается циклов repeat, forever и while.

ast_loop_statement returns [LoopStatement model = new LoopStatement()]
    : ^(AST_LOOP_STATEMENT
        ^(AST_LOOP_TYPE ( KW_FOREVER {$model.setForever();}
                        | KW_REPEAT  {$model.setRepeat();} 
                        | KW_WHILE   {$model.setWhile();}
                        | KW_FOR     {$model.setFor();}))
        (init=ast_assignment
            {$model.setInitialization($init.model);})? // Добавлен ?
        ^(AST_EXPRESSION ast_expression
            {$model.setExpression($ast_expression.model);})
        (step=ast_assignment
            {$model.setIteration($step.model);})? // Добавлен ?
        ^(AST_STATEMENT  ast_statement
            {$model.setStatement($ast_statement.model);})
        ast_attributes_opt
            {$model.setAttributes($ast_attributes_opt.model);}
      )
;
#3

Updated by Alexander Kamkin over 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF