org.nlogo.nvm
Class DefaultCompilerServices

java.lang.Object
  extended by org.nlogo.nvm.DefaultCompilerServices
All Implemented Interfaces:
org.nlogo.api.CompilerServices

public class DefaultCompilerServices
extends Object
implements org.nlogo.api.CompilerServices


Constructor Summary
DefaultCompilerServices(CompilerInterface compiler)
           
 
Method Summary
 String autoConvert(String source, boolean subprogram, boolean reporter, String modelVersion)
           
 void checkCommandSyntax(String source)
           
 void checkReporterSyntax(String source)
           
 Map<String,List<Object>> findProcedurePositions(String source)
           
 org.nlogo.api.Token getTokenAtPosition(String source, int pos)
           
 boolean isValidIdentifier(String s)
           
 Object readFromString(String source)
           
 Object readNumberFromString(String source)
           
 org.nlogo.api.Token[] tokenizeForColorization(String source)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCompilerServices

public DefaultCompilerServices(CompilerInterface compiler)
Method Detail

autoConvert

public String autoConvert(String source,
                          boolean subprogram,
                          boolean reporter,
                          String modelVersion)
Specified by:
autoConvert in interface org.nlogo.api.CompilerServices

readNumberFromString

public Object readNumberFromString(String source)
                            throws CompilerException
Specified by:
readNumberFromString in interface org.nlogo.api.CompilerServices
Throws:
CompilerException

checkReporterSyntax

public void checkReporterSyntax(String source)
                         throws CompilerException
Specified by:
checkReporterSyntax in interface org.nlogo.api.CompilerServices
Throws:
CompilerException

checkCommandSyntax

public void checkCommandSyntax(String source)
                        throws CompilerException
Specified by:
checkCommandSyntax in interface org.nlogo.api.CompilerServices
Throws:
CompilerException

readFromString

public Object readFromString(String source)
                      throws CompilerException
Specified by:
readFromString in interface org.nlogo.api.CompilerServices
Throws:
CompilerException

isValidIdentifier

public boolean isValidIdentifier(String s)
Specified by:
isValidIdentifier in interface org.nlogo.api.CompilerServices

tokenizeForColorization

public org.nlogo.api.Token[] tokenizeForColorization(String source)
Specified by:
tokenizeForColorization in interface org.nlogo.api.CompilerServices

getTokenAtPosition

public org.nlogo.api.Token getTokenAtPosition(String source,
                                              int pos)
Specified by:
getTokenAtPosition in interface org.nlogo.api.CompilerServices

findProcedurePositions

public Map<String,List<Object>> findProcedurePositions(String source)
Specified by:
findProcedurePositions in interface org.nlogo.api.CompilerServices