Module Simula

Class LabeledStatement


public final class LabeledStatement extends Statement
Labeled Statement.
 
 Syntax:
 
   label-statement =  label : { label : } statement 
 
            label = identifier

 
Link to GitHub: Source File.
Author:
Øystein Myhre Andersen
  • Field Details

    • labels

      private final Vector<String> labels
      The list of labels.
    • statement

      private final Statement statement
      The statement
  • Constructor Details

    • LabeledStatement

      LabeledStatement(int line, Vector<String> labels, Statement statement)
      Create a new LabeledStatement.
      Parameters:
      line - the source line number
      labels - the label identifiers
      statement - the labeled statement
  • Method Details

    • doChecking

      public void doChecking()
      Description copied from class: SyntaxClass
      Perform semantic checking.

      This must be redefined in every subclass.

      Overrides:
      doChecking in class SyntaxClass
    • doJavaCoding

      public void doJavaCoding()
      Description copied from class: SyntaxClass
      Output Java code.
      Overrides:
      doJavaCoding in class Statement
    • printTree

      public void printTree(int indent)
      Description copied from class: SyntaxClass
      Utility print syntax tree method.
      Overrides:
      printTree in class SyntaxClass
      Parameters:
      indent - number of spaces leading the lines
    • toString

      public String toString()
      Overrides:
      toString in class Object