java.lang.Objectorg.nlogo.nvm.Syntax
public final class Syntax
Field Summary | |
---|---|
static int |
COMMAND_PRECEDENCE
|
static int |
NORMAL_PRECEDENCE
|
static int |
TYPE_AGENT
|
static int |
TYPE_AGENTSET
|
static int |
TYPE_BOOLEAN
|
static int |
TYPE_BOOLEAN_BLOCK
|
static int |
TYPE_BRACKETED
|
static int |
TYPE_COMMAND_BLOCK
|
static int |
TYPE_LINK
|
static int |
TYPE_LINKSET
|
static int |
TYPE_LIST
|
static int |
TYPE_NOBODY
|
static int |
TYPE_NUMBER
|
static int |
TYPE_NUMBER_BLOCK
|
static int |
TYPE_OPTIONAL
|
static int |
TYPE_OTHER_BLOCK
|
static int |
TYPE_PATCH
|
static int |
TYPE_PATCHSET
|
static int |
TYPE_READABLE
|
static int |
TYPE_REFERENCE
|
static int |
TYPE_REPEATABLE
|
static int |
TYPE_REPORTER_BLOCK
|
static int |
TYPE_STRING
|
static int |
TYPE_TURTLE
|
static int |
TYPE_TURTLESET
|
static int |
TYPE_VOID
|
static int |
TYPE_WILDCARD
|
Method Summary | |
---|---|
String |
agentClassString()
|
static String |
aTypeName(int mask)
|
static String |
aTypeName(Object obj)
|
String |
blockAgentClassString()
|
static Syntax |
commandSyntax()
|
static Syntax |
commandSyntax(boolean switches)
|
static Syntax |
commandSyntax(int[] right)
|
static Syntax |
commandSyntax(int[] right,
boolean switches)
|
static Syntax |
commandSyntax(int[] right,
int dfault)
|
static Syntax |
commandSyntax(int[] right,
int dfault,
String agentClassString,
String blockAgentClassString,
boolean switches)
|
static Syntax |
commandSyntax(int[] right,
String agentClassString)
|
static Syntax |
commandSyntax(int[] right,
String agentClassString,
boolean switches)
|
static Syntax |
commandSyntax(int[] right,
String agentClassString,
String blockAgentClassString,
boolean switches)
|
static Syntax |
commandSyntax(String agentClassString,
boolean switches)
|
String |
dump()
|
static int |
getAgentSetMask(Class<? extends Agent> type)
|
String |
getPositionPhrase(int argIndex)
The returns an english-text phrase, describing the position of the argument at the given index, relative to the instruction itself. |
static int |
getTypeConstant(Class<?> typeC)
|
boolean |
isInfix()
indicates whether this instruction should be parsed as infix. |
boolean |
isRightAssociative()
|
int |
left()
|
int |
min()
|
int |
precedence()
|
static Syntax |
reporterSyntax(int ret)
|
static Syntax |
reporterSyntax(int[] right,
int ret)
|
static Syntax |
reporterSyntax(int[] right,
int ret,
int dfault)
|
static Syntax |
reporterSyntax(int[] right,
int ret,
int dfault,
int min)
|
static Syntax |
reporterSyntax(int[] right,
int ret,
String agentClassString)
|
static Syntax |
reporterSyntax(int[] right,
int ret,
String agentClassString,
String blockAgentClassString)
|
static Syntax |
reporterSyntax(int left,
int[] right,
int ret,
int precedence)
|
static Syntax |
reporterSyntax(int left,
int[] right,
int ret,
int precedence,
boolean isRightAssociative)
|
static Syntax |
reporterSyntax(int left,
int[] right,
int ret,
int precedence,
boolean isRightAssociative,
String agentClassString,
String blockAgentClassString)
|
static Syntax |
reporterSyntax(int left,
int[] right,
int ret,
int precedence,
int dfault,
boolean isRightAssociative,
String agentClassString,
String blockAgentClassString)
|
static Syntax |
reporterSyntax(int ret,
String agentClassString)
|
int |
ret()
|
int[] |
right()
|
int |
rightDefault()
returns the number of args this instruction takes on the right by default. |
boolean |
switches()
|
int |
totalDefault()
returns the total number of args, left and right, this instruction takes by default. |
static String |
typeName(int mask)
|
static String |
typeName(Object obj)
|
static boolean |
typesAreCompatible(int mask,
int value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_VOID
public static final int TYPE_NUMBER
public static final int TYPE_BOOLEAN
public static final int TYPE_STRING
public static final int TYPE_LIST
public static final int TYPE_TURTLESET
public static final int TYPE_PATCHSET
public static final int TYPE_LINKSET
public static final int TYPE_AGENTSET
public static final int TYPE_NOBODY
public static final int TYPE_TURTLE
public static final int TYPE_PATCH
public static final int TYPE_LINK
public static final int TYPE_AGENT
public static final int TYPE_READABLE
public static final int TYPE_WILDCARD
public static final int TYPE_REFERENCE
public static final int TYPE_COMMAND_BLOCK
public static final int TYPE_BOOLEAN_BLOCK
public static final int TYPE_NUMBER_BLOCK
public static final int TYPE_OTHER_BLOCK
public static final int TYPE_REPORTER_BLOCK
public static final int TYPE_BRACKETED
public static final int TYPE_REPEATABLE
public static final int TYPE_OPTIONAL
public static final int COMMAND_PRECEDENCE
public static final int NORMAL_PRECEDENCE
Method Detail |
---|
public int[] right()
public int left()
public int ret()
public int precedence()
public boolean isRightAssociative()
public String agentClassString()
public String blockAgentClassString()
public boolean switches()
public static Syntax commandSyntax()
public static Syntax commandSyntax(boolean switches)
public static Syntax commandSyntax(String agentClassString, boolean switches)
public static Syntax commandSyntax(int[] right)
public static Syntax commandSyntax(int[] right, boolean switches)
public static Syntax commandSyntax(int[] right, String agentClassString)
public static Syntax commandSyntax(int[] right, String agentClassString, boolean switches)
public static Syntax commandSyntax(int[] right, String agentClassString, String blockAgentClassString, boolean switches)
public static Syntax commandSyntax(int[] right, int dfault, String agentClassString, String blockAgentClassString, boolean switches)
public static Syntax commandSyntax(int[] right, int dfault)
public static Syntax reporterSyntax(int ret)
public static Syntax reporterSyntax(int ret, String agentClassString)
public static Syntax reporterSyntax(int left, int[] right, int ret, int precedence)
public static Syntax reporterSyntax(int left, int[] right, int ret, int precedence, boolean isRightAssociative)
public static Syntax reporterSyntax(int[] right, int ret)
public static Syntax reporterSyntax(int[] right, int ret, String agentClassString, String blockAgentClassString)
public static Syntax reporterSyntax(int[] right, int ret, String agentClassString)
public static Syntax reporterSyntax(int[] right, int ret, int dfault)
public static Syntax reporterSyntax(int[] right, int ret, int dfault, int min)
public static Syntax reporterSyntax(int left, int[] right, int ret, int precedence, boolean isRightAssociative, String agentClassString, String blockAgentClassString)
public static Syntax reporterSyntax(int left, int[] right, int ret, int precedence, int dfault, boolean isRightAssociative, String agentClassString, String blockAgentClassString)
public boolean isInfix()
public int rightDefault()
public int totalDefault()
public int min()
public String getPositionPhrase(int argIndex)
argIndex
- - index of the argument we want to describe
public static int getAgentSetMask(Class<? extends Agent> type)
public static boolean typesAreCompatible(int mask, int value)
public static String aTypeName(Object obj)
public static String typeName(Object obj)
public static String aTypeName(int mask)
public static String typeName(int mask)
public static int getTypeConstant(Class<?> typeC)
public String dump()