Module suggest

Class ProductionStatementScope

All Implemented Interfaces:
Member, Scope, Symbol, SymbolWithModifiers

public class ProductionStatementScope extends LocalScopeSymbol
A scope for the script blocks in xl rules
  • Constructor Details

    • ProductionStatementScope

      public ProductionStatementScope(Scope scope)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Scope
      Often scopes have names like function or class names. For unnamed scopes like code blocks, you can just return "local" or something.
      Specified by:
      getName in interface Scope
      Specified by:
      getName in interface Symbol
      Overrides:
      getName in class LocalScopeSymbol
    • getSymbols

      public Collection<? extends Symbol> getSymbols(int flags)
      Production statement includes their nested scope symbols because scripts can be defined in productions and their declared variables should be available from any following production statements. The productions statements are enclosed one after another to push the variable they declare available only for the following ones. E.g. xx ==> {int i;} F F {int j;} M M ; The F "see" the i, the M see the i and j.
      Specified by:
      getSymbols in interface Scope
      Overrides:
      getSymbols in class BaseScope