Basilisk Constants
Below are all the constants defined by the Basilisk 1.0 release.
-
AT_BOOLEAN
Module: BSKAttributeDef
Indicates the attribute is declared to be a boolean value.
-
AT_CATEGORY
Module: BSKAttributeDef
Indicates the attribute is declared to be a category value.
-
AT_NONE
Module: BSKAttributeDef
Indicates the attribute has not been declared a value (error, or bug condition).
-
AT_NUMBER
Module: BSKAttributeDef
Indicates the attribute is declared to be a numeric (including dice) value.
-
AT_RULE
Module: BSKAttributeDef
Indicates the attribute is declared to be a rule value.
-
AT_STRING
Module: BSKAttributeDef
Indicates the attribute is declared to be a string value.
-
AT_THING
Module: BSKAttributeDef
Indicates the attribute is declared to be a thing value.
-
BIT_SET_SIZE
Module: BSKBitSet
The number of 32-bit integers in a bit-set.
-
BSKFALSE
The boolean constant 'false'.
-
BSKTRUE
The boolean constant 'true'.
-
OF_LOCAL
Module: bskenv.h
The given object was created by or is local to the currently
executing rule.
-
OF_NONE
Module: bskenv.h
The given object has no flags.
-
OF_PERSISTANT
Module: bskenv.h
The given object is a persistant object (existing in the database).
-
OF_TRANSIENT
Module: bskenv.h
The given object is being passed between rules.
-
OF_VISITED
Module: bskenv.h
The given object has been visited. This is a temporary flag that
is used while doing garbage collection.
-
OP_ADD
Module: BSKRule
The two topmost items on the execution stack are added together (or concatenated, if
one or both of them are strings). The items must be numeric or string values.
The result is pushed onto the stack.
-
OP_AND
Module: BSKRule
The two topmost items on the execution stack are and'ed, using the logical 'and'
operator. Both items must be numeric values. The result is pushed onto the stack.
-
OP_CALL
Module: BSKRule
The (BSKUI8) parameter to this instruction is the number of stack items to treat as
parameters to a rule or function call. After the parameters is the entity
to call. If the entity is a rule object (or dereferences to a rule object), that rule
is called. If the entity is numeric, it is treated as the ID of a built-in function
to execute. Either way, the return value is pushed onto the stack after all parameters
and the called entity are popped off the stack.
-
OP_DIV
Module: BSKRule
Divides the topmost two items (topmost is the denominator). The result is pushed onto
the stack. Both items must be numeric.
-
OP_DREF
Module: BSKRule
The topmost item must be an identifier of a valid attribute, and the second must be a
Thing object. The specified attribute of the Thing is obtained, or created, as
necessary, and pushed onto the stack.
-
OP_DUP
Module: BSKRule
Duplicates the topmost stack item (which is NOT popped off as a result of this
call).
-
OP_ELEM
Module: BSKRule
The topmost item must be a numeric value, and the second is an array value. The element
at the given index of the array is pushed onto the stack.
-
OP_END
Module: BSKRule
Execution of the current rule is terminated.
-
OP_EQ
Module: BSKRule
The topmost two stack items are tested for equivalency, and the boolean result is
pushed onto the stack.
-
OP_FIRST
Module: BSKRule
The topmost stack item is a category object. It's first member (or null) is pushed
onto the stack.
-
OP_GE
Module: BSKRule
Compares the second topmost item (A) to the topmost item (B), and puts on the stack the
result of the boolean comparison 'A >= B'.
-
OP_GET
Module: BSKRule
-
OP_GT
Module: BSKRule
Compares the second topmost item (A) to the topmost item (B), and puts on the stack the
result of the boolean comparison 'A > B'.
-
OP_JMPF
Module: BSKRule
Tests the topmost stack item (which must be numeric) to see if it evaluates (boolean-wise)
to false. If so, the BSKUI32 parameter to this instruction is treated as the
address to jump to.
-
OP_JMPT
Module: BSKRule
Tests the topmost stack item (which must be numeric) to see if it evaluates (boolean-wise)
to true. If so, the BSKUI32 parameter to this instruction is treated as the
address to jump to.
-
OP_JUMP
Module: BSKRule
The BSKUI32 parameter of this instruction is treated as the address to jump to.
-
OP_LBYTE
Module: BSKRule
The BSKUI8 parameter of this instruction is pushed onto the stack.
-
OP_LDICE
Module: BSKRule
The dice parameter of this instruction is pushed onto the stack.
-
OP_LDWORD
Module: BSKRule
The BSKUI32 parameter of this instruction is pushed onto the stack.
-
OP_LE
Module: BSKRule
Compares the second topmost item (A) to the topmost item (B), and puts on the stack the
result of the boolean comparison 'A <= B'.
-
OP_LFLOAT
Module: BSKRule
The BSKFLOAT parameter of this instruction is pushed onto the stack.
-
OP_LINE
Module: BSKRule
The BSKUI32 parameter of this instruction is treated as the current line number
being executed for the current rule (for debugging and error handling).
-
OP_LSTR
Module: BSKRule
Loads all bytes from the current position to the first 0 byte and pushes them onto the
stack as a string value (null-terimated).
-
OP_LT
Module: BSKRule
Compares the second topmost item (A) to the topmost item (B), and puts on the stack the
result of the boolean comparison 'A < B'.
-
OP_LWORD
Module: BSKRule
The BSKUI16 parameter of this instruction is pushed onto the stack.
-
OP_MOD
Module: BSKRule
Performs modulus division on the topmost two stack items (topmost is the denominator).
Pushes the result onto the stack.
-
OP_MUL
Module: BSKRule
Multiplies the topmost two stack items together and pushes the result onto the
stack.
-
OP_NE
Module: BSKRule
Compares the topmost two stack items and pushes boolean 'true' onto the stack if the
items are not equivalent, and boolean 'false' otherwise.
-
OP_NEG
Module: BSKRule
Logically negates the topmost stack item (which must be numeric) and pushes the result
onto the stack.
-
OP_NEXT
Module: BSKRule
The topmost stack item must be a BSKCategoryEntry object. The next CategoryEntry in the
list is pushed onto the stack.
-
OP_NOOP
Module: BSKRule
NO OPeration.
-
OP_NOT
Module: BSKRule
Pushes boolean 'true' onto the stack if the topmost stack item is boolean 'false', and
pushes boolean 'false' onto the stack if the topmost stack item is boolean 'true'.
-
OP_NULL
Module: BSKRule
Pushes a null value onto the stack.
-
OP_OR
Module: BSKRule
The two topmost items on the execution stack are or'ed, using the logical 'or'
operator. Both items must be numeric values. The result is pushed onto the stack.
-
OP_POP
Module: BSKRule
Pops the topmost stack item off the stack.
-
OP_POW
Module: BSKRule
The second topmost stack item (A) and the topmost stack item (B) must both be numeric.
The result of "A^B" (A raised to the power of B) is pushed onto the stack.
-
OP_PUT
Module: BSKRule
Puts the topmost value into the variable (or other dereferencable object) at the
second topmost stack item.
-
OP_SUB
Module: BSKRule
Subtracts the topmost stack item from the second topmost stack item and pushes
the result onto the stack. Both items must be numeric.
-
OP_SWAP
Module: BSKRule
Swaps the topmost two stack items.
-
OP_TYPEOF
Module: BSKRule
The topmost stack item must be numeric (and represent the type to test). Pushes
boolean 'true' if the second topmost stack item is of the given type, and 'false'
otherwise.
-
OT_CATEGORY
Module: bskenv.h
The object type of a BSKCategory.
-
OT_RULE
Module: bskenv.h
The object type of a BSKRule.
-
OT_THING
Module: bskenv.h
The object type of a BSKThing.
-
PE_BUG_DETECTED
Module: BSKParse
A bug has been detected in the parser. The message associated with the error is
passed as the 'data' parameter, and should be interpreted as a BSKCHAR*.
-
PE_CANNOT_OPEN_FILE
Module: BSKParse
A file could not be opened (such as an included file). The file that could not
be opened is passed as the 'data' parameter, and should be interpreted as a BSKCHAR*.
-
PE_EXIT_LOOP_NOT_IN_LOOP
Module: BSKParse
An 'exit loop' statement did not appear in a loop context. The data parameter is
not used.
-
PE_FORWARD_NOT_DEFINED
Module: BSKParse
An entity (thing, category, or rule) was declared 'forward' but never defined. The
id of the entity is passed as the data parameter.
-
PE_NOERROR
Module: BSKParse
The parse completed successfully.
-
PE_REDEFINED_IDENTIFIER
Module: BSKParse
An identifier was redefined as an entity of a different type. The id of the entity
is passed as the data parameter.
-
PE_TOO_MANY_ATTRIBUTES
Module: BSKParse
An entry in a template definition has more attributes than the template expected. The
data parameter is not used.
-
PE_UNDECLARED_IDENTIFIER
Module: BSKParse
An identifier is used, but has never been declared. The data parameter is the id of the
referenced identifier.
-
PE_UNEXPECTED_TOKEN
Module: BSKParse
A token type was encountered that was other than one that was expected. The data parameter
is the token-type that was expected.
-
PE_WRONG_TYPE
Module: BSKParse
An identifier was used or referenced as an entity of the wrong type. The data parameter
is the identifier that was referenced.
-
RTE_BUG
Module: BSKExec
A bug was detected in the VM (not the script that was being executed).
-
RTE_CALL_OF_NONFUNCTION
Module: BSKExec
A non-function was called as if it were a function.
-
RTE_DIVIDE_BY_ZERO
Module: BSKExec
An operation divided by zero.
-
RTE_DOMAIN_ERROR
Module: BSKExec
An operation failed due to a domain error (like sqrt(-1)).
-
RTE_HALTED
Module: BSKExec
The execution was halted (by setting the 'halt' parameter of the BSKExecOpts
structure to true).
-
RTE_INVALID_OPERANDS
Module: BSKExec
The operands to a particular instruction or operation were invalid. The 'message'
parameter has more information.
-
RTE_INVALID_RULE
Module: BSKExec
A rule was referenced that was not a rule.
-
RTE_STACK_UNDERFLOW
Module: BSKExec
There were too few items on the stack to service the requested operation. (This
will usually be the result of a bug in the parser).
-
RTE_SUCCESS
Module: BSKExec
The VM returned successfully.
-
RTE_UKNOWN_INSTRUCTION
Module: BSKExec
An unknown instruction was encountered in the code stream for the currently
executing rule.
-
RTE_WRONG_PARAM_COUNT
Module: BSKExec
The wrong number of parameters were passed to a built-in function.
-
RTE_WRONG_UNITS
Module: BSKExec
Two numbers were compared (or a conversion requested) that had incompatible
units.
-
RULE_RETURN_VAL
Module: BSKRule
The name of the variable used to hold the return value for a rule.
-
SF_FORWARD_DECL
Module: BSKSymbolTable
The given symbol is declared has 'forward' and has not yet been defined.
-
SF_NONE
Module: BSKSymbolTable
No flags for the symbol table.
-
ST_ATTRIBUTE
Module: BSKSymbolTable
The symbol defines an attribute.
-
ST_BUILTIN
Module: BSKSymbolTable
The symbol defines a built-in function.
-
ST_CATEGORY
Module: BSKSymbolTable
The symbol defines a category.
-
ST_NONE
Module: BSKSymbolTable
The symbol does not define anything (a bug, or error condition).
-
ST_RULE
Module: BSKSymbolTable
The symbol defines a rule.
-
ST_THING
Module: BSKSymbolTable
The symbol defines a thing.
-
ST_UNIT
Module: BSKSymbolTable
The symbol defines a unit.
-
ST_VARIABLE
Module: BSKSymbolTable
The symbol defines a variable.
-
TID_ARRAY
Module: bskenv.h
Represents an Array type in the execution environment.
-
TID_BOOLEAN
Module: bskenv.h
Represents a boolean type in the execution environment.
-
TID_CATEGORY
Module: bskenv.h
Represents the Category type in the execution environment.
-
TID_NUMBER
Module: bskenv.h
Represents a numeric or dice type in the execution environment.
-
TID_RULE
Module: bskenv.h
Represents the Rule type in the execution environment.
-
TID_STRING
Module: bskenv.h
Represents the string type in the execution environment.
-
TID_THING
Module: bskenv.h
Represents the Thing type in the execution environment.
-
TT_AND
Module: BSKTokens
'and'
-
TT_ARRAY
Module: BSKTokens
'array'
-
TT_ATTRIBUTE
Module: BSKTokens
'attribute'
-
TT_BOOLEAN_WORD
Module: BSKTokens
'boolean'
-
TT_CASE
Module: BSKTokens
'case'
-
TT_CATEGORY
Module: BSKTokens
'category'
-
TT_DEFAULT
Module: BSKTokens
'default'
-
TT_DICE
Module: BSKTokens
A dice value has been parsed.
-
TT_DO
Module: BSKTokens
'do'
-
TT_ELSE
Module: BSKTokens
'else'
-
TT_ELSEIF
Module: BSKTokens
'elseif'
-
TT_EMPTY
Module: BSKTokens
The token represents an error detected by the lexer.
-
TT_END
Module: BSKTokens
'end'
-
TT_EOF
Module: BSKTokens
The end-of-file has been reached.
-
TT_EQ
Module: BSKTokens
'eq'
-
TT_EXIT
Module: BSKTokens
'exit'
-
TT_FALSE
Module: BSKTokens
'false'
-
TT_FOR
Module: BSKTokens
'for'
-
TT_FORWARD
Module: BSKTokens
'forward'
-
TT_GE
Module: BSKTokens
'ge'
-
TT_GT
Module: BSKTokens
'gt'
-
TT_IDENTIFIER
Module: BSKTokens
An identifier was parsed. The token holds the identifier.
-
TT_IF
Module: BSKTokens
'if'
-
TT_IN
Module: BSKTokens
'in'
-
TT_INCLUDE
Module: BSKTokens
'include'
-
TT_IS
Module: BSKTokens
'is'
-
TT_LE
Module: BSKTokens
'le'
-
TT_LOOP
Module: BSKTokens
'loop'
-
TT_LT
Module: BSKTokens
'lt'
-
TT_NE
Module: BSKTokens
'ne'
-
TT_NO
Module: BSKTokens
'no'
-
TT_NOT
Module: BSKTokens
'not'
-
TT_NULL
Module: BSKTokens
'null'
-
TT_NUMBER
Module: BSKTokens
A number has been parsed.
-
TT_NUMBER_WORD
Module: BSKTokens
'number'
-
TT_OFF
Module: BSKTokens
'off'
-
TT_ON
Module: BSKTokens
'on'
-
TT_OR
Module: BSKTokens
'or'
-
TT_PUNCT_CARET
Module: BSKTokens
'^'
-
TT_PUNCT_COLON
Module: BSKTokens
':'
-
TT_PUNCT_COMMA
Module: BSKTokens
','
-
TT_PUNCT_DASH
Module: BSKTokens
'-'
-
TT_PUNCT_DOLLAR
Module: BSKTokens
'$'
-
TT_PUNCT_DOT
Module: BSKTokens
'.'
-
TT_PUNCT_EQ
Module: BSKTokens
'='
-
TT_PUNCT_LBRACE
Module: BSKTokens
'{'
-
TT_PUNCT_LBRACKET
Module: BSKTokens
'['
-
TT_PUNCT_LPAREN
Module: BSKTokens
'('
-
TT_PUNCT_OCTOTHORP
Module: BSKTokens
'#'
-
TT_PUNCT_PERCENT
Module: BSKTokens
'%'
-
TT_PUNCT_PLUS
Module: BSKTokens
'+'
-
TT_PUNCT_RBRACE
Module: BSKTokens
'}'
-
TT_PUNCT_RBRACKET
Module: BSKTokens
']'
-
TT_PUNCT_RPAREN
Module: BSKTokens
')'
-
TT_PUNCT_SEMICOLON
Module: BSKTokens
';'
-
TT_PUNCT_SLASH
Module: BSKTokens
'/'
-
TT_PUNCT_STAR
Module: BSKTokens
'*'
-
TT_RULE
Module: BSKTokens
'rule'
-
TT_STRING
Module: BSKTokens
A string was parsed.
-
TT_STRING_WORD
Module: BSKTokens
'string'
-
TT_TEMPLATE
Module: BSKTokens
'template'
-
TT_THEN
Module: BSKTokens
'then'
-
TT_THING
Module: BSKTokens
'thing'
-
TT_TO
Module: BSKTokens
'to'
-
TT_TRUE
Module: BSKTokens
'true'
-
TT_TYPEOF
Module: BSKTokens
'typeof'
-
TT_UNIT
Module: BSKTokens
'unit'
-
TT_WHILE
Module: BSKTokens
'while'
-
TT_YES
Module: BSKTokens
'yes'
-
UERR_INCOMPATIBLE_UNITS
Module: BSKUnitDefinition
Returned from BSKConvertUnits,
this value indicates that the units requested were not compatible and could not
be converted.
-
VC_EPSILON
Module: BSKValue
As close to zero as we care to get.
-
VC_INFINITY
Module: BSKValue
As close to infinity as we care to get.
-
VF_MODIFIER
Module: BSKValue
The given dice value has a modifier (+,-,*).
-
VF_MULTIPLICATIVE
Module: BSKValue
The modifier for the given dice value is multiplicative, rather than additive.
-
VF_NONE
Module: BSKValue
No flags for the value.
-
VF_UNITS
Module: BSKValue
The numeric value has units.
-
VT_ALLOCATED
Module: BSKValue
The value was allocated internally and should eventually be deallocated (VT_NUMERIC,
VT_STRING, etc).
-
VT_ARRAY
Module: BSKValue
The value is an array.
-
VT_ATTRIBUTE
Module: BSKValue
The value is an attribute.
-
VT_BOOLEAN
Module: BSKValue
The value is boolean.
-
VT_BYTE
Module: BSKValue
The value is a byte.
-
VT_CATEGORIZABLE
Module: BSKValue
The value is categorizable (meaning, it may be a value in a category).
-
VT_CATEGORY
Module: BSKValue
The value is a category.
-
VT_CATEGORY_ENTRY
Module: BSKValue
The value is a category entry.
-
VT_DEREFERENCABLE
Module: BSKValue
The value is dereferencable (an attribute, or a variable, for instance).
-
VT_DICE
Module: BSKValue
The value is a dice value.
-
VT_DWORD
Module: BSKValue
The value is a BSKI32 value.
-
VT_FLOAT
Module: BSKValue
The value is a BSKFLOAT value.
-
VT_INTEGER
Module: BSKValue
The value is an integer value (VT_BYTE, VT_WORD, VT_DWORD, VT_BOOLEAN)
-
VT_NULL
Module: BSKValue
The value is null.
-
VT_NUMBER
Module: BSKValue
The value is a number (VT_INTEGER, VT_DICE, VT_FLOAT)
-
VT_RULE
Module: BSKValue
The value is a rule.
-
VT_STRING
Module: BSKValue
The value is a string.
-
VT_THING
Module: BSKValue
The value is a thing.
-
VT_VALUE
Module: BSKValue
The value is itself another value.
-
VT_VARIABLE
Module: BSKValue
The value is a variable.
-
VT_WORD
Module: BSKValue
The value is a BSKI16 value.
Return to the API
Last updated on 9 Feb 2001 by Jamis Buck (minam@rpgplanet.com)