|
API V2.0 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectrepast.simphony.relogo.ide.code.CodeSectionParser
public class CodeSectionParser
| Field Summary | |
|---|---|
protected LinkedList |
generatedProcedures
|
protected LinkedList |
includeFiles
|
protected SymbolTable |
symbolTable
|
| Constructor Summary | |
CodeSectionParser()
|
|
CodeSectionParser(StringBuffer sb)
|
|
CodeSectionParser(String s)
|
|
| Method Summary | |
|---|---|
protected String
|
camelCase(String text)
|
void
|
declareAttribute(String domain, String name)
|
void
|
declareAttribute(String domain, String name, String label, String type, Object initialValue, boolean generate)
|
void
|
declareAttribute(String domain, String name, String label, String type, Object initialValue)
|
void
|
declareAttribute(Attribute attr)
|
protected void
|
declareBreed(String plural, String singular)
|
void
|
declareClass(String cls, String parent)
|
protected void
|
declareDirectedLinkBreed(String plural, String singular)
|
void
|
declarePrimitive(Profile prof)
|
void
|
declareSymbol(String domain, String name, Object data)
|
protected void
|
declareSymbols(String domain, CommonTree block)
|
protected void
|
declareUndirectedLinkBreed(String plural, String singular)
|
protected LinkedList
|
disambiguateBlock(LinkedList contents)
Once code has been generated, statements which are to be assigned as arguments are already resolved to concrete interpretations. |
static void
|
dumpChildren(CommonTree tree, int depth)
|
void
|
dumpTree(CommonTree tree)
|
protected void
|
extractSymbols(CommonTree decl)
|
LinkedList
|
generateCode()
|
Block
|
generateCode(CommonTree ast)
Generate code for an anonymous, parameterless block from the AST. |
LinkedList
|
generateCode(CommonTree statement, boolean inParen)
|
LinkedList
|
getGeneratedProcedures()
|
LinkedList
|
getIncludeFiles()
|
String
|
getJavaName(String name)
|
MethodPartition
|
getMethodPartition()
|
protected int
|
getPrecedence(Object defns, boolean atParen)
|
protected int
|
getReductionSize(LinkedList possibleReductions)
|
protected int
|
getReductions(Object defns, LinkedList work, LinkedList possibleReductions, boolean atParen, int pos)
|
protected LinkedHashMap
|
getSymbolCategory(String type)
|
SymbolTable
|
getSymbolTable()
|
protected Block
|
interpretExpression(CommonTree decl)
|
protected boolean
|
isInfix(Object defns, boolean atParen)
|
boolean
|
parse(String s)
|
protected Profile
|
processCommand(CommonTree decl)
|
protected Profile
|
processReporter(CommonTree decl)
|
protected void
|
tryReduction(LinkedList newDefns, LinkedList work, boolean atParen)
|
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
protected LinkedList generatedProcedures
protected LinkedList includeFiles
protected SymbolTable symbolTable
| Constructor Detail |
|---|
public CodeSectionParser()
public CodeSectionParser(StringBuffer sb)
public CodeSectionParser(String s)
| Method Detail |
|---|
protected String camelCase(String text)
public void declareAttribute(String domain, String name)
public void declareAttribute(String domain, String name, String label, String type, Object initialValue, boolean generate)
public void declareAttribute(String domain, String name, String label, String type, Object initialValue)
public void declareAttribute(Attribute attr)
protected void declareBreed(String plural, String singular)
public void declareClass(String cls, String parent)
protected void declareDirectedLinkBreed(String plural, String singular)
public void declarePrimitive(Profile prof)
public void declareSymbol(String domain, String name, Object data)
protected void declareSymbols(String domain, CommonTree block)
protected void declareUndirectedLinkBreed(String plural, String singular)
protected LinkedList disambiguateBlock(LinkedList contents)
public static void dumpChildren(CommonTree tree, int depth)
public void dumpTree(CommonTree tree)
protected void extractSymbols(CommonTree decl)
public LinkedList generateCode()
public Block generateCode(CommonTree ast)
public LinkedList generateCode(CommonTree statement, boolean inParen)
public LinkedList getGeneratedProcedures()
public LinkedList getIncludeFiles()
public String getJavaName(String name)
public MethodPartition getMethodPartition()
protected int getPrecedence(Object defns, boolean atParen)
protected int getReductionSize(LinkedList possibleReductions)
protected int getReductions(Object defns, LinkedList work, LinkedList possibleReductions, boolean atParen, int pos)
protected LinkedHashMap getSymbolCategory(String type)
public SymbolTable getSymbolTable()
protected Block interpretExpression(CommonTree decl)
protected boolean isInfix(Object defns, boolean atParen)
public boolean parse(String s)
protected Profile processCommand(CommonTree decl)
protected Profile processReporter(CommonTree decl)
protected void tryReduction(LinkedList newDefns, LinkedList work, boolean atParen)
ReLogo API V2.0