API V2.1

repast.simphony.relogo.ide.code
[Java] Class CodeSectionParser

java.lang.Object
  repast.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)

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

generatedProcedures

protected LinkedList generatedProcedures


includeFiles

protected LinkedList includeFiles


symbolTable

protected SymbolTable symbolTable


 
Constructor Detail

CodeSectionParser

public CodeSectionParser()


CodeSectionParser

public CodeSectionParser(StringBuffer sb)


CodeSectionParser

public CodeSectionParser(String s)


 
Method Detail

camelCase

protected String camelCase(String text)


declareAttribute

public void declareAttribute(String domain, String name)


declareAttribute

public void declareAttribute(String domain, String name, String label, String type, Object initialValue, boolean generate)


declareAttribute

public void declareAttribute(String domain, String name, String label, String type, Object initialValue)


declareAttribute

public void declareAttribute(Attribute attr)


declareBreed

protected void declareBreed(String plural, String singular)


declareClass

public void declareClass(String cls, String parent)


declareDirectedLinkBreed

protected void declareDirectedLinkBreed(String plural, String singular)


declarePrimitive

public void declarePrimitive(Profile prof)


declareSymbol

public void declareSymbol(String domain, String name, Object data)


declareSymbols

protected void declareSymbols(String domain, CommonTree block)


declareUndirectedLinkBreed

protected void declareUndirectedLinkBreed(String plural, String singular)


disambiguateBlock

protected LinkedList disambiguateBlock(LinkedList contents)
Once code has been generated, statements which are to be assigned as arguments are already resolved to concrete interpretations. Procedures which are to be interpreted in value closures, however, may still be represented as lists. Fix all of these by taking the first available interpretation.
Parameters:
contents
Returns:


dumpChildren

public static void dumpChildren(CommonTree tree, int depth)


dumpTree

public void dumpTree(CommonTree tree)


extractSymbols

protected void extractSymbols(CommonTree decl)


generateCode

public LinkedList generateCode()


generateCode

public Block generateCode(CommonTree ast)


generateCode

public LinkedList generateCode(CommonTree statement, boolean inParen)


getGeneratedProcedures

public LinkedList getGeneratedProcedures()


getIncludeFiles

public LinkedList getIncludeFiles()


getJavaName

public String getJavaName(String name)


getMethodPartition

public MethodPartition getMethodPartition()


getPrecedence

protected int getPrecedence(Object defns, boolean atParen)


getReductionSize

protected int getReductionSize(LinkedList possibleReductions)


getReductions

protected int getReductions(Object defns, LinkedList work, LinkedList possibleReductions, boolean atParen, int pos)


getSymbolCategory

protected LinkedHashMap getSymbolCategory(String type)


getSymbolTable

public SymbolTable getSymbolTable()


interpretExpression

protected Block interpretExpression(CommonTree decl)


isInfix

protected boolean isInfix(Object defns, boolean atParen)


parse

public boolean parse(String s)


processCommand

protected Profile processCommand(CommonTree decl)


processReporter

protected Profile processReporter(CommonTree decl)


tryReduction

protected void tryReduction(LinkedList newDefns, LinkedList work, boolean atParen)


 

ReLogo API V2.1