| package org.eclipse.photran.internal.core.f95parser.symboltable.entries; |
| |
| import org.eclipse.photran.internal.core.f95parser.Nonterminal; |
| import org.eclipse.photran.internal.core.f95parser.ParseTreeNode; |
| import org.eclipse.photran.internal.core.f95parser.Token; |
| import org.eclipse.photran.internal.core.f95parser.symboltable.SymbolTable; |
| import org.eclipse.photran.internal.core.f95parser.symboltable.SymbolTableEntry; |
| import org.eclipse.photran.internal.core.f95parser.symboltable.SymbolTableError; |
| import org.eclipse.photran.internal.core.f95parser.symboltable.SymbolTableVisitor; |
| |
| /** |
| * Symbol table entry for namelists |
| * |
| * NOTE: The identifier token may not actually exist in the program, since |
| * namelists do not have to be named |
| * |
| * @author joverbey |
| */ |
| public class NamelistEntry extends SymbolTableEntry |
| { |
| public NamelistEntry(SymbolTable parentTable, Token identifier, ParseTreeNode correspondingParseTreeNode) |
| { |
| super(parentTable, identifier, correspondingParseTreeNode); |
| |
| if (correspondingParseTreeNode.getRootNonterminal() != Nonterminal.XNAMELISTGROUPS) |
| throw new SymbolTableError("The ParseTreeNode passed to the NamelistEntry constructor should be an xNamelistGroups"); |
| } |
| |
| public String getTypeDescription() |
| { |
| return "Namelist"; |
| } |
| |
| public void visitEntryUsing(SymbolTableVisitor visitor) |
| { |
| visitor.visit(this); |
| } |
| } |