Class AwkTuples
- All Implemented Interfaces:
Serializable
AwkTuples class.
- Author:
- Danny Daglas
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Numerically adds the top two elements of the stack with the result pushed onto the stack.static final int
Apply the RS variable by notifying the partitioning reader that there is a new regular expression to use when partitioning input records.static final int
Convert a list of array indices to a concatenated string with SUBSEP.static final int
Assign the ARGC variable offset.static final int
Assign the ARGV variable offset.static final int
Assigns the top-of-stack to a variable.static final int
Assigns an item to an array element.static final int
Assigns the top-of-stack to $0.static final int
Assigns an item as a particular input field; the field number can be 0.static final int
Built-in function that pops the first two items off the stack, calls the java.lang.Math.atan2 method with these as arguments, and places the result onto the stack.static final int
Call a user function.static final int
Cast to doublestatic final int
Cast to integerstatic final int
Cast to stringstatic final int
Checks whether the top-of-stack is of a particular class type; if not, an AwkRuntimeException is thrown.static final int
Close the specified file.static final int
Compares the top two stack elements; pushes 1 onto the stack if equal, 0 if not equal.static final int
Compares the top two stack elements; pushes 1 onto the stack if x1 > x2, 0 if not equal.static final int
Compares the top two stack elements; pushes 1 onto the stack if x1 < x2, 0 if not equal.static final int
Pop and concatenate two strings from the top-of-stack; push the result onto the stack.static final int
Returns a pair of regex patterns.static final int
Consume next line of input; assigning $0 and recalculating $1, $2, etc.static final int
Assign the CONVFMT variable offset.static final int
Built-in function that pops the top-of-stack, calls the java.lang.Math.cos method with the top-of-stack as the argument, and places the result onto the stack.static final int
Decreases the variable reference by one; pushes the result onto the stack.static final int
Decreases the array element reference by one; pushes the result onto the stack.static final int
Decreases the input field variable by one; pushes the result onto the stack.static final int
Delete the specified array.static final int
Deletes an entry in an array.static final int
Constant_DEREF_ARRAY_=338
static final int
Obtains an item from the variable manager and push it onto the stack.static final int
Divides the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.static final int
Divides the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.static final int
Divides the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.static final int
Numerically divides the top two elements of the stack with the result pushed onto the stack.static final int
Constant_DUMP_=337
static final int
Duplicates the top-of-stack on the stack.static final int
Assign the ENVIRON variable offset.static final int
Execute the specified AWK codestatic final int
Terminates execution and returns specified exit code.static final int
Terminates execution without specifying an exit code.static final int
Built-in function that pops the top-of-stack, calls the java.lang.Math.exp method with the top-of-stack as the argument, and places the result onto the stack.static final int
Call a function from an extensionstatic final int
Assign the FILENAME variable offset.static final int
Assign the FNR variable offset.static final int
Assign the FS variable offset.static final int
Define a user function.static final int
Removes an item from the KeyList (set) and pushes it onto the operand stack.static final int
Push an input field onto the stack.static final int
Obtains input from stdin/filename-args and pushes input line and status code onto the stack.static final int
Jumps to a specified address.static final int
Pops and evaluates the top-of-stack; if false, it jumps to a specified address.static final int
Pops and evaluates the top-of-stack; if true, it jumps to a specified address.static final int
Increases the variable reference by one; pushes the result onto the stack.static final int
Increases the array element reference by one; pushes the result onto the stack.static final int
Increases the input field variable by one; pushes the result onto the stack.static final int
Built-in function that locates a substring within a source string and pushes the location onto the stack.static final int
Built-in function that pops the top-of-stack, removes its fractional part, if any, and places the result onto the stack.static final int
Tests whether the KeyList (set) is empty; jumps to the argument address if empty, steps to the next instruction if not.static final int
Returns whether the specified key is in the array.static final int
Retrieves and pushes a Set of keys from an associative array onto the stack.static final int
Depending on the argument, pop and evaluate the string length of the top-of-stack or evaluate the string length of $0; in either case, push the result onto the stack.static final int
Built-in function that pops the top-of-stack, calls the java.lang.Math.log method with the top-of-stack as the argument, and places the result onto the stack.static final int
Built-in function that searches a string as input to a regular expression, the location of the match is pushed onto the stack.static final int
Applies a regular expression to the top stack element; pushes 1 if it matches, 0 if it does not match.static final int
Decreases the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.static final int
Decreases the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.static final int
Decreases the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.static final int
Numerically takes the modulus of the top two elements of the stack with the result pushed onto the stack.static final int
Takes the modules of the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.static final int
Takes the modulus of the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.static final int
Takes the modulus of the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.static final int
Multiplies the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.static final int
Multiplies the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.static final int
Multiplies the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.static final int
Numerically multiplies the top two elements of the stack with the result pushed onto the stack.static final int
Evaluates the numerical NEGATION of the top stack element; pushes the result onto the stack.static final int
Assign the NF variable offset.static final int
A no-operation.static final int
Evaluates the logical NOT of the top stack element; pushes the result onto the stack.static final int
Assign the NR variable offset.static final int
Assign the OFMT variable offset.static final int
Assign the OFS variable offset.static final int
Assign the ORS variable offset.static final int
Increase the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.static final int
Increase the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.static final int
Increases the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.static final int
Pops an item off the operand stack.static final int
Decreases the variable reference by one; pushes the original value onto the stack.static final int
Increases the variable reference by one; pushes the original value onto the stack.static final int
Numerically raises the top element to the power of the next element with the result pushed onto the stack.static final int
Raises the contents of the variable to the power of the adjustment value; assigns the result to the variable and pushes the result onto the stack.static final int
Raises the contents of an indexed array to the power of an adjustment value; assigns the result to the array and pushes the result onto the stack.static final int
Raises the contents of an input field to the power of an adjustment value; assigns the result to the input field and pushes the result onto the stack.static final int
Prints N number of items that are on the operand stack.static final int
Prints N number of items that are on the operand stack to a specified file.static final int
Prints N number of items that are on the operand stack to a process executing a specified command (via a pipe).static final int
Performs a formatted print of N items that are on the operand stack.static final int
Performs a formatted print of N items that are on the operand stack to a specified file.static final int
Performs a formatted print of N items that are on the operand stack to a process executing a specified command (via a pipe).static final int
Pushes an item onto the operand stack.static final int
Obtains the next random number from the random number generator and push it onto the stack.static final int
Returns a regex pattern.static final int
Get the return value of the user function that was calledstatic final int
Assign the RLENGTH variable offset.static final int
Assign the RS variable offset.static final int
Assign the RSTART variable offset.static final int
Internal.static final int
Internal: sets the number of global variablesstatic final int
Sets the return value of a user function.static final int
Internal.static final int
Built-in function that pops the top-of-stack, calls the java.lang.Math.sin method with the top-of-stack as the argument, and places the result onto the stack.static final int
Extension: Pauses the execution thread by N number of seconds.static final int
Built-in function to split a string by a regexp and put the components into an array.static final int
Constant_SPRINTF_=270
static final int
Built-in function that pops the top-of-stack, takes its square root, and places the result onto the stack.static final int
Seeds the random number generator.static final int
Built-in function that substitutes an occurrence (or all occurrences) of a string in a particular array cell and replaces it with another.static final int
Built-in function that substitutes an occurrence (or all occurrences) of a string in $0 and replaces it with another.static final int
Built-in function that substitutes an occurrence (or all occurrences) of a string in a field reference and replaces it with another.static final int
Built-in function that substitutes an occurrence (or all occurrences) of a string in a particular variable and replaces it with another.static final int
Assign the SUBSEP variable offset.static final int
Built-in function that pushes a substring of the top-of-stack onto the stack.static final int
Numerically subtracts the top two elements of the stack with the result pushed onto the stack.static final int
Swaps the top two elements of the stack.static final int
Built-in function that executes the top-of-stack as a system command and pushes the return code onto the stack.static final int
Deprecated.static final int
Converts the top-of-stack to a number.static final int
Built-in function that converts all the letters in the top-of-stack to lower case and pushes the result onto the stack.static final int
Built-in function that converts all the letters in the top-of-stack to upper case and pushes the result onto the stack.static final int
Converts the top stack element to a number; pushes the result onto the stack.static final int
Obtains input from a command (process) and pushes input line and status code onto the stack.static final int
Obtains input from a file and pushes input line and status code onto the stack. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add()
add.void
addGlobalVariableNameToOffsetMapping
(String varname, int offset, boolean is_array) Accept a {variable_name -> offset} mapping such that global variables can be assigned while processing name=value and filename command-line arguments.address.void
applyRS()
applyRS.void
applySubsep
(int count) applySubsep.void
argcOffset
(int offset) argcOffset.void
argvOffset
(int offset) argvOffset.void
assign
(int offset, boolean is_global) assign.void
assignArray
(int offset, boolean is_global) assignArray.void
assignAsInput.void
assignAsInputField.void
atan2()
atan2.void
callFunction
(HasFunctionAddress has_func_addr, String func_name, int num_formal_params, int num_actual_params) callFunction.void
castDouble.void
castInt()
castInt.void
castString.boolean
checkClass
(Class<?> cls) checkClass.void
close()
close.void
cmpEq()
cmpEq.void
cmpGt()
cmpGt.void
cmpLt()
cmpLt.void
concat()
concat.void
regexpPair.void
consumeInput
(Address address) consumeInput.void
convfmtOffset
(int offset) convfmtOffset.void
cos()
cos.createAddress
(String label) createAddress.void
dec
(int offset, boolean is_global) dec.void
decArrayRef
(int offset, boolean is_global) decArrayRef.void
decDollarRef.void
deleteArray
(int offset, boolean is_global) deleteArray.void
deleteArrayElement
(int offset, boolean is_global) deleteArrayElement.void
dereference
(int offset, boolean is_array, boolean is_global) dereference.void
dereferenceArray.void
divEq
(int offset, boolean is_global) divEq.void
divEqArray
(int offset, boolean is_global) divEqArray.void
divEqInputField.void
divide()
divide.void
dump
(int num_args) dump.void
dump
(PrintStream ps) dump.void
dup()
dup.void
environOffset
(int offset) environOffset.void
exec()
exec.void
exitWithCode.void
exitWithCode.void
exp()
exp.void
extension.void
filenameOffset
(int offset) filenameOffset.void
fnrOffset
(int offset) fnrOffset.void
fsOffset
(int offset) fsOffset.void
function.void
getFirstAndRemoveFromList.getFunctionNameSet.getGlobalVariableAarrayMap.getGlobalVariableOffsetMap.void
getInputField.void
getlineInput.void
gotoAddress
(Address address) gotoAddress.void
ifFalse.void
ifTrue.void
inc
(int offset, boolean is_global) inc.void
incArrayRef
(int offset, boolean is_global) incArrayRef.void
incDollarRef.void
index()
index.void
intFunc()
intFunc.void
isEmptyList
(Address address) isEmptyList.void
isIn()
isIn.void
keylist()
keylist.void
length
(int num_exprs) length.void
log()
log.void
match()
match.void
matches()
matches.void
minusEq
(int offset, boolean is_global) minusEq.void
minusEqArray
(int offset, boolean is_global) minusEqArray.void
minusEqInputField.void
mod()
mod.void
modEq
(int offset, boolean is_global) modEq.void
modEqArray
(int offset, boolean is_global) modEqArray.void
modEqInputField.void
multEq
(int offset, boolean is_global) multEq.void
multEqArray
(int offset, boolean is_global) multEqArray.void
multEqInputField.void
multiply()
multiply.void
negate()
negate.void
nfOffset
(int offset) nfOffset.void
nop()
nop.void
not()
not.void
nrOffset
(int offset) nrOffset.void
ofmtOffset
(int offset) ofmtOffset.void
ofsOffset
(int offset) ofsOffset.void
orsOffset
(int offset) orsOffset.void
plusEq
(int offset, boolean is_global) plusEq.void
plusEqArray
(int offset, boolean is_global) plusEqArray.void
plusEqInputField.void
pop()
pop.void
popSourceLineNumber
(int lineno) popSourceLineNumber.void
postDec
(int offset, boolean is_global) postDec.void
postInc
(int offset, boolean is_global) postInc.void
Executed after all tuples are entered in the queue.void
pow()
pow.void
powEq
(int offset, boolean is_global) powEq.void
powEqArray
(int offset, boolean is_global) powEqArray.void
powEqInputField.void
print
(int num_exprs) print.void
printf
(int num_exprs) printf.void
printfToFile
(int num_exprs, boolean append) printfToFile.void
printfToPipe
(int num_exprs) printfToPipe.void
printToFile
(int num_exprs, boolean append) printToFile.void
printToPipe
(int num_exprs) printToPipe.void
push.void
pushSourceLineNumber
(int lineno) Push the current line number onto the line number stack.void
rand()
rand.void
regexp.void
returnFromFunction.void
rlengthOffset
(int offset) rlengthOffset.void
rsOffset
(int offset) rsOffset.void
rstartOffset
(int offset) rstartOffset.void
scriptThis.void
setExitAddress
(Address addr) setExitAddress.void
setFunctionNameSet
(Set<String> function_names) Accept a set of function names from the parser.void
setNumGlobals
(int num_globals) setNumGlobals.void
setReturnResult.void
setWithinEndBlocks
(boolean b) setWithinEndBlocks.void
sin()
sin.void
sleep
(int num_args) sleep.void
split
(int numargs) split.void
sprintf
(int num_exprs) sprintf.void
sqrt()
sqrt.void
srand
(int num) srand.void
subForArrayReference
(int offset, boolean is_global, boolean is_gsub) subForArrayReference.void
subForDollar0
(boolean is_gsub) subForDollar0.void
subForDollarReference
(boolean is_gsub) subForDollarReference.void
subForVariable
(int offset, boolean is_global, boolean is_gsub) subForVariable.void
subsepOffset
(int offset) subsepOffset.void
substr
(int numargs) substr.void
subtract()
subtract.void
swap()
swap.void
system()
system.void
tolower()
tolower.void
toNumber()
toNumber.static String
toOpcodeString
(int opcode) toOpcodeString.top()
top.void
toupper()
toupper.void
unary plus.void
useAsCommandInput.void
useAsFileInput.
-
Field Details
-
_POP_
public static final int _POP_Pops an item off the operand stack.Stack before: x ...
Stack after: ...- See Also:
-
_PUSH_
public static final int _PUSH_Pushes an item onto the operand stack.Stack before: ...
Stack after: x ...- See Also:
-
_IFFALSE_
public static final int _IFFALSE_Pops and evaluates the top-of-stack; if false, it jumps to a specified address.Argument: address
Stack before: x ...
Stack after: ...- See Also:
-
_TO_NUMBER_
public static final int _TO_NUMBER_Converts the top-of-stack to a number.Stack before: x ...
Stack after: x (as a number)- See Also:
-
_IFTRUE_
public static final int _IFTRUE_Pops and evaluates the top-of-stack; if true, it jumps to a specified address.Argument: address
Stack before: x ...
Stack after: ...- See Also:
-
_GOTO_
public static final int _GOTO_Jumps to a specified address. The operand stack contents are unaffected.- See Also:
-
_NOP_
public static final int _NOP_A no-operation. The operand stack contents are unaffected.- See Also:
-
_PRINT_
public static final int _PRINT_Prints N number of items that are on the operand stack. The number of items are passed in as a tuple argument.Argument: # of items (N)
Stack before: x1 x2 x3 .. xN ...
Stack after: ...- See Also:
-
_PRINT_TO_FILE_
public static final int _PRINT_TO_FILE_Prints N number of items that are on the operand stack to a specified file. The file is passed in on the stack. The number of items are passed in as a tuple argument, as well as whether to overwrite the file or not (append mode).Argument 1: # of items (N)
Argument 2: true = append, false = overwriteStack before: x1 x2 x3 .. xN filename ...
Stack after: ...- See Also:
-
_PRINT_TO_PIPE_
public static final int _PRINT_TO_PIPE_Prints N number of items that are on the operand stack to a process executing a specified command (via a pipe). The command string is passed in on the stack. The number of items are passed in as a tuple argument.Argument: # of items (N)
Stack before: x1 x2 x3 .. xN command-string ...
Stack after: ...- See Also:
-
_PRINTF_
public static final int _PRINTF_Performs a formatted print of N items that are on the operand stack. The number of items are passed in as a tuple argument.Argument: # of items (N)
Stack before: x1 x2 x3 .. xN ...
Stack after: ...- See Also:
-
_PRINTF_TO_FILE_
public static final int _PRINTF_TO_FILE_Performs a formatted print of N items that are on the operand stack to a specified file. The file is passed in on the stack. The number of items are passed in as a tuple argument, as well as whether to overwrite the file or not (append mode).Argument 1: # of items (N)
Argument 2: true = append, false = overwriteStack before: x1 x2 x3 .. xN filename ...
Stack after: ...- See Also:
-
_PRINTF_TO_PIPE_
public static final int _PRINTF_TO_PIPE_Performs a formatted print of N items that are on the operand stack to a process executing a specified command (via a pipe). The command string is passed in on the stack. The number of items are passed in as a tuple argument.Argument: # of items (N)
Stack before: x1 x2 x3 .. xN command-string ...
Stack after: ...- See Also:
-
_SPRINTF_
public static final int _SPRINTF_Constant_SPRINTF_=270
- See Also:
-
_LENGTH_
public static final int _LENGTH_Depending on the argument, pop and evaluate the string length of the top-of-stack or evaluate the string length of $0; in either case, push the result onto the stack.The input field length evaluation mode is provided to support backward compatibility with the deprecated usage of length (i.e., no arguments).
Argument: 0 to use $0, use top-of-stack otherwise
If argument is 0:
Stack before: ...
else
Stack after: length-of-$0 ...Stack before: x ...
Stack after: length-of-x ...- See Also:
-
_CONCAT_
public static final int _CONCAT_Pop and concatenate two strings from the top-of-stack; push the result onto the stack.Stack before: x y ...
Stack after: x-concatenated-with-y ...- See Also:
-
_ASSIGN_
public static final int _ASSIGN_Assigns the top-of-stack to a variable. The contents of the stack are unaffected.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: x ...
Stack after: x ...- See Also:
-
_ASSIGN_ARRAY_
public static final int _ASSIGN_ARRAY_Assigns an item to an array element. The item remains on the stack.Argument 1: offset of the particular associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: index-into-array item ...
Stack after: item ...- See Also:
-
_ASSIGN_AS_INPUT_
public static final int _ASSIGN_AS_INPUT_Assigns the top-of-stack to $0. The contents of the stack are unaffected. Upon assignment, individual field variables are recalculated.Stack before: x ...
Stack after: x ...- See Also:
-
_ASSIGN_AS_INPUT_FIELD_
public static final int _ASSIGN_AS_INPUT_FIELD_Assigns an item as a particular input field; the field number can be 0. Upon assignment, associating input fields are affected. For example, if the following assignment were made:$3 = "hi"
$0 = "hello there"
Stack before: field-num x ...
Stack after: x ...- See Also:
-
_DEREFERENCE_
public static final int _DEREFERENCE_Obtains an item from the variable manager and push it onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: ...
Stack after: x ...- See Also:
-
_PLUS_EQ_
public static final int _PLUS_EQ_Increase the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: n ...
Stack after: x+n ...- See Also:
-
_MINUS_EQ_
public static final int _MINUS_EQ_Decreases the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: n ...
Stack after: x-n ...- See Also:
-
_MULT_EQ_
public static final int _MULT_EQ_Multiplies the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: n ...
Stack after: x*n ...- See Also:
-
_DIV_EQ_
public static final int _DIV_EQ_Divides the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: n ...
Stack after: x/n ...- See Also:
-
_MOD_EQ_
public static final int _MOD_EQ_Takes the modules of the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: n ...
Stack after: x%n ...- See Also:
-
_POW_EQ_
public static final int _POW_EQ_Raises the contents of the variable to the power of the adjustment value; assigns the result to the variable and pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: n ...
Stack after: x^n ...- See Also:
-
_PLUS_EQ_ARRAY_
public static final int _PLUS_EQ_ARRAY_Increase the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx n ...
Stack after: x+n ...- See Also:
-
_MINUS_EQ_ARRAY_
public static final int _MINUS_EQ_ARRAY_Decreases the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx n ...
Stack after: x-n ...- See Also:
-
_MULT_EQ_ARRAY_
public static final int _MULT_EQ_ARRAY_Multiplies the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx n ...
Stack after: x*n ...- See Also:
-
_DIV_EQ_ARRAY_
public static final int _DIV_EQ_ARRAY_Divides the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx n ...
Stack after: x/n ...- See Also:
-
_MOD_EQ_ARRAY_
public static final int _MOD_EQ_ARRAY_Takes the modulus of the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx n ...
Stack after: x%n ...- See Also:
-
_POW_EQ_ARRAY_
public static final int _POW_EQ_ARRAY_Raises the contents of an indexed array to the power of an adjustment value; assigns the result to the array and pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx n ...
Stack after: x^n ...- See Also:
-
_PLUS_EQ_INPUT_FIELD_
public static final int _PLUS_EQ_INPUT_FIELD_Increases the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.Stack before: input-field_number n ...
Stack after: x+n ...- See Also:
-
_MINUS_EQ_INPUT_FIELD_
public static final int _MINUS_EQ_INPUT_FIELD_Decreases the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.Stack before: input-field_number n ...
Stack after: x-n ...- See Also:
-
_MULT_EQ_INPUT_FIELD_
public static final int _MULT_EQ_INPUT_FIELD_Multiplies the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.Stack before: input-field_number n ...
Stack after: x*n ...- See Also:
-
_DIV_EQ_INPUT_FIELD_
public static final int _DIV_EQ_INPUT_FIELD_Divides the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.Stack before: input-field_number n ...
Stack after: x/n ...- See Also:
-
_MOD_EQ_INPUT_FIELD_
public static final int _MOD_EQ_INPUT_FIELD_Takes the modulus of the contents of an input field by an adjustment value; assigns the result to the input field and pushes the result onto the stack.Stack before: input-field_number n ...
Stack after: x%n ...- See Also:
-
_POW_EQ_INPUT_FIELD_
public static final int _POW_EQ_INPUT_FIELD_Raises the contents of an input field to the power of an adjustment value; assigns the result to the input field and pushes the result onto the stack.Stack before: input-field_number n ...
Stack after: x^n ...- See Also:
-
_SRAND_
public static final int _SRAND_Seeds the random number generator. If there are no arguments, the current time (as a long value) is used as the seed. Otherwise, the top-of-stack is popped and used as the seed value.Argument: # of arguments
If # of arguments is 0:
Stack before: ...
else
Stack after: old-seed ...Stack before: x ...
Stack after: old-seed ...- See Also:
-
_RAND_
public static final int _RAND_Obtains the next random number from the random number generator and push it onto the stack.Stack before: ...
Stack after: random-number ...- See Also:
-
_INTFUNC_
public static final int _INTFUNC_Built-in function that pops the top-of-stack, removes its fractional part, if any, and places the result onto the stack.Stack before: x ...
Stack after: (int)x ...- See Also:
-
_SQRT_
public static final int _SQRT_Built-in function that pops the top-of-stack, takes its square root, and places the result onto the stack.Stack before: x ...
Stack after: sqrt(x) ...- See Also:
-
_LOG_
public static final int _LOG_Built-in function that pops the top-of-stack, calls the java.lang.Math.log method with the top-of-stack as the argument, and places the result onto the stack.Stack before: x ...
Stack after: log(x) ...- See Also:
-
_EXP_
public static final int _EXP_Built-in function that pops the top-of-stack, calls the java.lang.Math.exp method with the top-of-stack as the argument, and places the result onto the stack.Stack before: x ...
Stack after: exp(x) ...- See Also:
-
_SIN_
public static final int _SIN_Built-in function that pops the top-of-stack, calls the java.lang.Math.sin method with the top-of-stack as the argument, and places the result onto the stack.Stack before: x ...
Stack after: sin(x) ...- See Also:
-
_COS_
public static final int _COS_Built-in function that pops the top-of-stack, calls the java.lang.Math.cos method with the top-of-stack as the argument, and places the result onto the stack.Stack before: x ...
Stack after: cos(x) ...- See Also:
-
_ATAN2_
public static final int _ATAN2_Built-in function that pops the first two items off the stack, calls the java.lang.Math.atan2 method with these as arguments, and places the result onto the stack.Stack before: x1 x2 ...
Stack after: atan2(x1,x2) ...- See Also:
-
_MATCH_
public static final int _MATCH_Built-in function that searches a string as input to a regular expression, the location of the match is pushed onto the stack. The RSTART and RLENGTH variables are set as a side effect. If a match is found, RSTART and function return value are set to the location of the match and RLENGTH is set to the length of the substring matched against the regular expression. If no match is found, RSTART (and return value) is set to 0 and RLENGTH is set to -1.Stack before: string regexp ...
Stack after: RSTART ...- See Also:
-
_INDEX_
public static final int _INDEX_Built-in function that locates a substring within a source string and pushes the location onto the stack. If the substring is not found, 0 is pushed onto the stack.Stack before: string substring ...
Stack after: location-index ...- See Also:
-
_SUB_FOR_DOLLAR_0_
public static final int _SUB_FOR_DOLLAR_0_Built-in function that substitutes an occurrence (or all occurrences) of a string in $0 and replaces it with another.Argument: true if global sub, false otherwise.
Stack before: regexp replacement-string ...
Stack after: ...- See Also:
-
_SUB_FOR_DOLLAR_REFERENCE_
public static final int _SUB_FOR_DOLLAR_REFERENCE_Built-in function that substitutes an occurrence (or all occurrences) of a string in a field reference and replaces it with another.Argument: true if global sub, false otherwise.
Stack before: field-num regexp replacement-string ...
Stack after: ...- See Also:
-
_SUB_FOR_VARIABLE_
public static final int _SUB_FOR_VARIABLE_Built-in function that substitutes an occurrence (or all occurrences) of a string in a particular variable and replaces it with another.Argument 1: variable offset in variable manager
Argument 2: is global variable
Argument 3: is global subStack before: regexp replacement-string orig-string ...
Stack after: ...- See Also:
-
_SUB_FOR_ARRAY_REFERENCE_
public static final int _SUB_FOR_ARRAY_REFERENCE_Built-in function that substitutes an occurrence (or all occurrences) of a string in a particular array cell and replaces it with another.Argument 1: array map offset in variable manager
Argument 2: is global array map
Argument 3: is global subStack before: array-index regexp replacement-string orig-string ...
Stack after: ...- See Also:
-
_SPLIT_
public static final int _SPLIT_Built-in function to split a string by a regexp and put the components into an array.Argument: # of arguments (parameters on stack)
If # of arguments is 2:
Stack before: string array ...
else
Stack after: n ...Stack before: string array regexp ...
Stack after: n ...- See Also:
-
_SUBSTR_
public static final int _SUBSTR_Built-in function that pushes a substring of the top-of-stack onto the stack. The tuple argument indicates whether to limit the substring to a particular end position, or to take the substring up to the end-of-string.Argument: # of arguments
If # of arguments is 2:
Stack before: string start-pos ...
else
Stack after: substring ...Stack before: string start-pos end-pos ...
Stack after: substring ...- See Also:
-
_TOLOWER_
public static final int _TOLOWER_Built-in function that converts all the letters in the top-of-stack to lower case and pushes the result onto the stack.Stack before: STRING-ARGUMENT ...
Stack after: string-argument ...- See Also:
-
_TOUPPER_
public static final int _TOUPPER_Built-in function that converts all the letters in the top-of-stack to upper case and pushes the result onto the stack.Stack before: string-argument ...
Stack after: STRING-ARGUMENT ...- See Also:
-
_SYSTEM_
public static final int _SYSTEM_Built-in function that executes the top-of-stack as a system command and pushes the return code onto the stack.Stack before: cmd ...
Stack after: return-code ...- See Also:
-
_SWAP_
public static final int _SWAP_Swaps the top two elements of the stack.Stack before: x1 x2 ...
Stack after: x2 x1 ...- See Also:
-
_ADD_
public static final int _ADD_Numerically adds the top two elements of the stack with the result pushed onto the stack.Stack before: x1 x2 ...
Stack after: x1+x2 ...- See Also:
-
_SUBTRACT_
public static final int _SUBTRACT_Numerically subtracts the top two elements of the stack with the result pushed onto the stack.Stack before: x1 x2 ...
Stack after: x1-x2 ...- See Also:
-
_MULTIPLY_
public static final int _MULTIPLY_Numerically multiplies the top two elements of the stack with the result pushed onto the stack.Stack before: x1 x2 ...
Stack after: x1*x2 ...- See Also:
-
_DIVIDE_
public static final int _DIVIDE_Numerically divides the top two elements of the stack with the result pushed onto the stack.Stack before: x1 x2 ...
Stack after: x1/x2 ...- See Also:
-
_MOD_
public static final int _MOD_Numerically takes the modulus of the top two elements of the stack with the result pushed onto the stack.Stack before: x1 x2 ...
Stack after: x1%x2 ...- See Also:
-
_POW_
public static final int _POW_Numerically raises the top element to the power of the next element with the result pushed onto the stack.Stack before: x1 x2 ...
Stack after: x1^x2 ...- See Also:
-
_INC_
public static final int _INC_Increases the variable reference by one; pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: ...
Stack after: x+1 ...- See Also:
-
_DEC_
public static final int _DEC_Decreases the variable reference by one; pushes the result onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: ...
Stack after: x-1 ...- See Also:
-
_INC_ARRAY_REF_
public static final int _INC_ARRAY_REF_Increases the array element reference by one; pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx ...
Stack after: x+1 ...- See Also:
-
_DEC_ARRAY_REF_
public static final int _DEC_ARRAY_REF_Decreases the array element reference by one; pushes the result onto the stack.Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or localStack before: array-idx ...
Stack after: x-1 ...- See Also:
-
_INC_DOLLAR_REF_
public static final int _INC_DOLLAR_REF_Increases the input field variable by one; pushes the result onto the stack.Stack before: field-idx ...
Stack after: x+1- See Also:
-
_DEC_DOLLAR_REF_
public static final int _DEC_DOLLAR_REF_Decreases the input field variable by one; pushes the result onto the stack.Stack before: field-idx ...
Stack after: x-1- See Also:
-
_DUP_
public static final int _DUP_Duplicates the top-of-stack on the stack.Stack before: x ...
Stack after: x x ...- See Also:
-
_NOT_
public static final int _NOT_Evaluates the logical NOT of the top stack element; pushes the result onto the stack.Stack before: x ...
Stack after: !x ...- See Also:
-
_NEGATE_
public static final int _NEGATE_Evaluates the numerical NEGATION of the top stack element; pushes the result onto the stack.Stack before: x ...
Stack after: -x ...- See Also:
-
_CMP_EQ_
public static final int _CMP_EQ_Compares the top two stack elements; pushes 1 onto the stack if equal, 0 if not equal.Stack before: x1 x2 ...
Stack after: x1==x2- See Also:
-
_CMP_LT_
public static final int _CMP_LT_Compares the top two stack elements; pushes 1 onto the stack if x1 < x2, 0 if not equal.Stack before: x1 x2 ...
Stack after: x1<x2- See Also:
-
_CMP_GT_
public static final int _CMP_GT_Compares the top two stack elements; pushes 1 onto the stack if x1 > x2, 0 if not equal.Stack before: x1 x2 ...
Stack after: x1>x2- See Also:
-
_MATCHES_
public static final int _MATCHES_Applies a regular expression to the top stack element; pushes 1 if it matches, 0 if it does not match.Stack before: x1 x2 ...
Stack after: (x1 ~ /x2/) ...- See Also:
-
_SLEEP_
public static final int _SLEEP_Extension: Pauses the execution thread by N number of seconds.Stack before: N ...
Stack after: ...- See Also:
-
_DUMP_
public static final int _DUMP_Constant_DUMP_=337
- See Also:
-
_DEREF_ARRAY_
public static final int _DEREF_ARRAY_Constant_DEREF_ARRAY_=338
- See Also:
-
_KEYLIST_
public static final int _KEYLIST_Retrieves and pushes a Set of keys from an associative array onto the stack. The Set is tagged with a KeyList interface.Stack before: associative-array ...
Stack after: key-list-set ...- See Also:
-
_IS_EMPTY_KEYLIST_
public static final int _IS_EMPTY_KEYLIST_Tests whether the KeyList (set) is empty; jumps to the argument address if empty, steps to the next instruction if not.Argument: jump-address-if-empty
Stack before: key-list ...
Stack after: ...- See Also:
-
_GET_FIRST_AND_REMOVE_FROM_KEYLIST_
public static final int _GET_FIRST_AND_REMOVE_FROM_KEYLIST_Removes an item from the KeyList (set) and pushes it onto the operand stack.Stack before: key-list ...
Stack after: 1st-item ...- See Also:
-
_CHECK_CLASS_
public static final int _CHECK_CLASS_Checks whether the top-of-stack is of a particular class type; if not, an AwkRuntimeException is thrown. The stack remains unchanged upon a successful check.Argument: class-type (i.e., KeyList.class)
Stack before: obj ...
Stack after: obj ...- See Also:
-
_GET_INPUT_FIELD_
public static final int _GET_INPUT_FIELD_Push an input field onto the stack.Stack before: field-id ...
Stack after: x ...- See Also:
-
_CONSUME_INPUT_
public static final int _CONSUME_INPUT_Consume next line of input; assigning $0 and recalculating $1, $2, etc. The input can come from the following sources:- stdin
- filename arguments
- See Also:
-
_GETLINE_INPUT_
public static final int _GETLINE_INPUT_Obtains input from stdin/filename-args and pushes input line and status code onto the stack. The input is partitioned into records based on the RS variable assignment as a regular expression.If there is input available, the input string and a return code of 1 is pushed. If EOF is reached, a blank (null) string ("") is pushed along with a 0 return code. Upon an IO error, a blank string and a -1 is pushed onto the operand stack.
Stack before: ...
Stack after: input-string return-code ...- See Also:
-
_USE_AS_FILE_INPUT_
public static final int _USE_AS_FILE_INPUT_Obtains input from a file and pushes input line and status code onto the stack. The input is partitioned into records based on the RS variable assignment as a regular expression.Upon initial execution, the file is opened and the handle is maintained until it is explicitly closed, or until the VM exits. Subsequent calls will obtain subsequent lines (records) of input until no more records are available.
If there is input available, the input string and a return code of 1 is pushed. If EOF is reached, a blank (null) string ("") is pushed along with a 0 return code. Upon an IO error, a blank string and a -1 is pushed onto the operand stack.
Stack before: filename ...
Stack after: input-string return-code ...- See Also:
-
_USE_AS_COMMAND_INPUT_
public static final int _USE_AS_COMMAND_INPUT_Obtains input from a command (process) and pushes input line and status code onto the stack. The input is partitioned into records based on the RS variable assignment as a regular expression.Upon initial execution, the a process is spawned to execute the specified command and the process reference is maintained until it is explicitly closed, or until the VM exits. Subsequent calls will obtain subsequent lines (records) of input until no more records are available.
If there is input available, the input string and a return code of 1 is pushed. If EOF is reached, a blank (null) string ("") is pushed along with a 0 return code. Upon an IO error, a blank string and a -1 is pushed onto the operand stack.
Stack before: command-line ...
Stack after: input-string return-code ...- See Also:
-
_NF_OFFSET_
public static final int _NF_OFFSET_Assign the NF variable offset. This is important for the AVM to set the variables as new input lines are processed.The operand stack is unaffected.
- See Also:
-
_NR_OFFSET_
public static final int _NR_OFFSET_Assign the NR variable offset. This is important for the AVM to increase the record number as new input lines received.The operand stack is unaffected.
- See Also:
-
_FNR_OFFSET_
public static final int _FNR_OFFSET_Assign the FNR variable offset. This is important for the AVM to increase the "file" record number as new input lines are received.The operand stack is unaffected.
- See Also:
-
_FS_OFFSET_
public static final int _FS_OFFSET_Assign the FS variable offset. This is important for the AVM to know how to split fields upon incoming records of input.The operand stack is unaffected.
- See Also:
-
_RS_OFFSET_
public static final int _RS_OFFSET_Assign the RS variable offset. This is important for the AVM to know how to create records from the stream(s) of input.The operand stack is unaffected.
- See Also:
-
_OFS_OFFSET_
public static final int _OFS_OFFSET_Assign the OFS variable offset. This is important for the AVM to use when outputting expressions via PRINT.The operand stack is unaffected.
- See Also:
-
_RSTART_OFFSET_
public static final int _RSTART_OFFSET_Assign the RSTART variable offset. The AVM sets this variable while executing the match() builtin function.The operand stack is unaffected.
- See Also:
-
_RLENGTH_OFFSET_
public static final int _RLENGTH_OFFSET_Assign the RLENGTH variable offset. The AVM sets this variable while executing the match() builtin function.The operand stack is unaffected.
- See Also:
-
_FILENAME_OFFSET_
public static final int _FILENAME_OFFSET_Assign the FILENAME variable offset. The AVM sets this variable while processing files from the command-line for input.The operand stack is unaffected.
- See Also:
-
_SUBSEP_OFFSET_
public static final int _SUBSEP_OFFSET_Assign the SUBSEP variable offset. The AVM uses this variable while building an index of a multi-dimensional array.The operand stack is unaffected.
- See Also:
-
_CONVFMT_OFFSET_
public static final int _CONVFMT_OFFSET_Assign the CONVFMT variable offset. The AVM uses this variable while converting numbers to strings.The operand stack is unaffected.
- See Also:
-
_OFMT_OFFSET_
public static final int _OFMT_OFFSET_Assign the OFMT variable offset. The AVM uses this variable while converting numbers to strings for printing.The operand stack is unaffected.
- See Also:
-
_ENVIRON_OFFSET_
public static final int _ENVIRON_OFFSET_Assign the ENVIRON variable offset. The AVM provides environment variables through this array.The operand stack is unaffected.
- See Also:
-
_ARGC_OFFSET_
public static final int _ARGC_OFFSET_Assign the ARGC variable offset. The AVM provides the number of arguments via this variable.The operand stack is unaffected.
- See Also:
-
_ARGV_OFFSET_
public static final int _ARGV_OFFSET_Assign the ARGV variable offset. The AVM provides command-line arguments via this variable.The operand stack is unaffected.
- See Also:
-
_APPLY_RS_
public static final int _APPLY_RS_Apply the RS variable by notifying the partitioning reader that there is a new regular expression to use when partitioning input records.The stack remains unaffected.
- See Also:
-
_CALL_FUNCTION_
public static final int _CALL_FUNCTION_Call a user function.Stack before: x1, x2, ..., xn
Stack after: f(x1, x2, ..., xn)- See Also:
-
_FUNCTION_
public static final int _FUNCTION_Define a user function.Stack remains unchanged
- See Also:
-
_SET_RETURN_RESULT_
public static final int _SET_RETURN_RESULT_Sets the return value of a user function.Stack before: x
Stack after: ...- See Also:
-
_RETURN_FROM_FUNCTION_
public static final int _RETURN_FROM_FUNCTION_Get the return value of the user function that was calledStack before: ...
Stack after: x- See Also:
-
_SET_NUM_GLOBALS_
public static final int _SET_NUM_GLOBALS_Internal: sets the number of global variables- See Also:
-
_CLOSE_
public static final int _CLOSE_Close the specified file.Stack before: file name
Stack after: result of the close operation- See Also:
-
_APPLY_SUBSEP_
public static final int _APPLY_SUBSEP_Convert a list of array indices to a concatenated string with SUBSEP. This is used for multidimensional arrays.Stack before: i1, i2, ..., in
Stack after: "i1SUBSEPi2SUBSEP...in"- See Also:
-
_DELETE_ARRAY_ELEMENT_
public static final int _DELETE_ARRAY_ELEMENT_Deletes an entry in an array.Stack before: i
Stack after: ...- See Also:
-
_SET_EXIT_ADDRESS_
public static final int _SET_EXIT_ADDRESS_Internal.Stack remains unchanged.
- See Also:
-
_SET_WITHIN_END_BLOCKS_
public static final int _SET_WITHIN_END_BLOCKS_Internal.Stack remains unchanged.
- See Also:
-
_EXIT_WITH_CODE_
public static final int _EXIT_WITH_CODE_Terminates execution and returns specified exit code.Stack before: integer
Stack after: N/A- See Also:
-
_REGEXP_
public static final int _REGEXP_Returns a regex pattern.Stack before: ...
Stack after: the regex pattern object- See Also:
-
_CONDITION_PAIR_
public static final int _CONDITION_PAIR_Returns a pair of regex patterns.Stack before: pattern1, pattern2
Stack after: regex pair object- See Also:
-
_IS_IN_
public static final int _IS_IN_Returns whether the specified key is in the array.Stack before: key, array
Stack after: true|false- See Also:
-
_CAST_INT_
public static final int _CAST_INT_Cast to integerStack before: object
Stack after: integer- See Also:
-
_CAST_DOUBLE_
public static final int _CAST_DOUBLE_Cast to doubleStack before: object
Stack after: double- See Also:
-
_CAST_STRING_
public static final int _CAST_STRING_Cast to stringStack before: object
Stack after: string- See Also:
-
_THIS_
public static final int _THIS_Deprecated.- See Also:
-
_EXTENSION_
public static final int _EXTENSION_Call a function from an extensionStack before: x1, x2, ..., xn
Stack after: f(x1, x2, ..., xn)- See Also:
-
_EXEC_
public static final int _EXEC_Execute the specified AWK codeStack before: script
Stack after: exit code of the script, or zero when successful, -1 when failed- See Also:
-
_DELETE_ARRAY_
public static final int _DELETE_ARRAY_Delete the specified array.Stack remains unchanged.
- See Also:
-
_UNARY_PLUS_
public static final int _UNARY_PLUS_Converts the top stack element to a number; pushes the result onto the stack.Stack before: x ...
Stack after: x ... (as a number)- See Also:
-
_EXIT_WITHOUT_CODE_
public static final int _EXIT_WITHOUT_CODE_Terminates execution without specifying an exit code.Stack before: N/A
Stack after: N/A- See Also:
-
_ORS_OFFSET_
public static final int _ORS_OFFSET_Assign the ORS variable offset. This is important for the AVM to use when outputting expressions via PRINT.The operand stack is unaffected.
- See Also:
-
_POSTINC_
public static final int _POSTINC_Increases the variable reference by one; pushes the original value onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: ...
Stack after: x ... or 0 if uninitialized- See Also:
-
_POSTDEC_
public static final int _POSTDEC_Decreases the variable reference by one; pushes the original value onto the stack.Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or localStack before: ...
Stack after: x ... or 0 if uninitialized- See Also:
-
-
Constructor Details
-
AwkTuples
public AwkTuples()
-
-
Method Details
-
toOpcodeString
toOpcodeString.
- Parameters:
opcode
- a int- Returns:
- a
String
object
-
pop
public void pop()pop.
-
push
push.
- Parameters:
o
- aObject
object
-
ifFalse
ifFalse.
- Parameters:
address
- aAddress
object
-
toNumber
public void toNumber()toNumber.
-
ifTrue
ifTrue.
- Parameters:
address
- aAddress
object
-
gotoAddress
gotoAddress.
- Parameters:
address
- aAddress
object
-
createAddress
createAddress.
-
address
address.
-
nop
public void nop()nop.
-
print
public void print(int num_exprs) print.
- Parameters:
num_exprs
- a int
-
printToFile
public void printToFile(int num_exprs, boolean append) printToFile.
- Parameters:
num_exprs
- a intappend
- a boolean
-
printToPipe
public void printToPipe(int num_exprs) printToPipe.
- Parameters:
num_exprs
- a int
-
printf
public void printf(int num_exprs) printf.
- Parameters:
num_exprs
- a int
-
printfToFile
public void printfToFile(int num_exprs, boolean append) printfToFile.
- Parameters:
num_exprs
- a intappend
- a boolean
-
printfToPipe
public void printfToPipe(int num_exprs) printfToPipe.
- Parameters:
num_exprs
- a int
-
sprintf
public void sprintf(int num_exprs) sprintf.
- Parameters:
num_exprs
- a int
-
length
public void length(int num_exprs) length.
- Parameters:
num_exprs
- a int
-
concat
public void concat()concat.
-
assign
public void assign(int offset, boolean is_global) assign.
- Parameters:
offset
- a intis_global
- a boolean
-
assignArray
public void assignArray(int offset, boolean is_global) assignArray.
- Parameters:
offset
- a intis_global
- a boolean
-
assignAsInput
public void assignAsInput()assignAsInput.
-
assignAsInputField
public void assignAsInputField()assignAsInputField.
-
dereference
public void dereference(int offset, boolean is_array, boolean is_global) dereference.
- Parameters:
offset
- a intis_array
- a booleanis_global
- a boolean
-
plusEq
public void plusEq(int offset, boolean is_global) plusEq.
- Parameters:
offset
- a intis_global
- a boolean
-
minusEq
public void minusEq(int offset, boolean is_global) minusEq.
- Parameters:
offset
- a intis_global
- a boolean
-
multEq
public void multEq(int offset, boolean is_global) multEq.
- Parameters:
offset
- a intis_global
- a boolean
-
divEq
public void divEq(int offset, boolean is_global) divEq.
- Parameters:
offset
- a intis_global
- a boolean
-
modEq
public void modEq(int offset, boolean is_global) modEq.
- Parameters:
offset
- a intis_global
- a boolean
-
powEq
public void powEq(int offset, boolean is_global) powEq.
- Parameters:
offset
- a intis_global
- a boolean
-
plusEqArray
public void plusEqArray(int offset, boolean is_global) plusEqArray.
- Parameters:
offset
- a intis_global
- a boolean
-
minusEqArray
public void minusEqArray(int offset, boolean is_global) minusEqArray.
- Parameters:
offset
- a intis_global
- a boolean
-
multEqArray
public void multEqArray(int offset, boolean is_global) multEqArray.
- Parameters:
offset
- a intis_global
- a boolean
-
divEqArray
public void divEqArray(int offset, boolean is_global) divEqArray.
- Parameters:
offset
- a intis_global
- a boolean
-
modEqArray
public void modEqArray(int offset, boolean is_global) modEqArray.
- Parameters:
offset
- a intis_global
- a boolean
-
powEqArray
public void powEqArray(int offset, boolean is_global) powEqArray.
- Parameters:
offset
- a intis_global
- a boolean
-
plusEqInputField
public void plusEqInputField()plusEqInputField.
-
minusEqInputField
public void minusEqInputField()minusEqInputField.
-
multEqInputField
public void multEqInputField()multEqInputField.
-
divEqInputField
public void divEqInputField()divEqInputField.
-
modEqInputField
public void modEqInputField()modEqInputField.
-
powEqInputField
public void powEqInputField()powEqInputField.
-
srand
public void srand(int num) srand.
- Parameters:
num
- a int
-
rand
public void rand()rand.
-
intFunc
public void intFunc()intFunc.
-
sqrt
public void sqrt()sqrt.
-
log
public void log()log.
-
exp
public void exp()exp.
-
sin
public void sin()sin.
-
cos
public void cos()cos.
-
atan2
public void atan2()atan2.
-
match
public void match()match.
-
index
public void index()index.
-
subForDollar0
public void subForDollar0(boolean is_gsub) subForDollar0.
- Parameters:
is_gsub
- a boolean
-
subForDollarReference
public void subForDollarReference(boolean is_gsub) subForDollarReference.
- Parameters:
is_gsub
- a boolean
-
subForVariable
public void subForVariable(int offset, boolean is_global, boolean is_gsub) subForVariable.
- Parameters:
offset
- a intis_global
- a booleanis_gsub
- a boolean
-
subForArrayReference
public void subForArrayReference(int offset, boolean is_global, boolean is_gsub) subForArrayReference.
- Parameters:
offset
- a intis_global
- a booleanis_gsub
- a boolean
-
split
public void split(int numargs) split.
- Parameters:
numargs
- a int
-
substr
public void substr(int numargs) substr.
- Parameters:
numargs
- a int
-
tolower
public void tolower()tolower.
-
toupper
public void toupper()toupper.
-
system
public void system()system.
-
exec
public void exec()exec.
-
swap
public void swap()swap.
-
add
public void add()add.
-
subtract
public void subtract()subtract.
-
multiply
public void multiply()multiply.
-
divide
public void divide()divide.
-
mod
public void mod()mod.
-
pow
public void pow()pow.
-
inc
public void inc(int offset, boolean is_global) inc.
- Parameters:
offset
- a intis_global
- a boolean
-
dec
public void dec(int offset, boolean is_global) dec.
- Parameters:
offset
- a intis_global
- a boolean
-
postInc
public void postInc(int offset, boolean is_global) postInc.
- Parameters:
offset
- a intis_global
- a boolean
-
postDec
public void postDec(int offset, boolean is_global) postDec.
- Parameters:
offset
- a intis_global
- a boolean
-
incArrayRef
public void incArrayRef(int offset, boolean is_global) incArrayRef.
- Parameters:
offset
- a intis_global
- a boolean
-
decArrayRef
public void decArrayRef(int offset, boolean is_global) decArrayRef.
- Parameters:
offset
- a intis_global
- a boolean
-
incDollarRef
public void incDollarRef()incDollarRef.
-
decDollarRef
public void decDollarRef()decDollarRef.
-
dup
public void dup()dup.
-
not
public void not()not.
-
negate
public void negate()negate.
-
unaryPlus
public void unaryPlus()unary plus.
-
cmpEq
public void cmpEq()cmpEq.
-
cmpLt
public void cmpLt()cmpLt.
-
cmpGt
public void cmpGt()cmpGt.
-
matches
public void matches()matches.
-
sleep
public void sleep(int num_args) sleep.
- Parameters:
num_args
- a int
-
dump
public void dump(int num_args) dump.
- Parameters:
num_args
- a int
-
dereferenceArray
public void dereferenceArray()dereferenceArray.
-
keylist
public void keylist()keylist.
-
isEmptyList
isEmptyList.
- Parameters:
address
- aAddress
object
-
getFirstAndRemoveFromList
public void getFirstAndRemoveFromList()getFirstAndRemoveFromList.
-
checkClass
checkClass.
- Parameters:
cls
- aClass
object- Returns:
- a boolean
-
getInputField
public void getInputField()getInputField.
-
consumeInput
consumeInput.
- Parameters:
address
- aAddress
object
-
getlineInput
public void getlineInput()getlineInput.
-
useAsFileInput
public void useAsFileInput()useAsFileInput.
-
useAsCommandInput
public void useAsCommandInput()useAsCommandInput.
-
nfOffset
public void nfOffset(int offset) nfOffset.
- Parameters:
offset
- a int
-
nrOffset
public void nrOffset(int offset) nrOffset.
- Parameters:
offset
- a int
-
fnrOffset
public void fnrOffset(int offset) fnrOffset.
- Parameters:
offset
- a int
-
fsOffset
public void fsOffset(int offset) fsOffset.
- Parameters:
offset
- a int
-
rsOffset
public void rsOffset(int offset) rsOffset.
- Parameters:
offset
- a int
-
ofsOffset
public void ofsOffset(int offset) ofsOffset.
- Parameters:
offset
- a int
-
orsOffset
public void orsOffset(int offset) orsOffset.
- Parameters:
offset
- a int
-
rstartOffset
public void rstartOffset(int offset) rstartOffset.
- Parameters:
offset
- a int
-
rlengthOffset
public void rlengthOffset(int offset) rlengthOffset.
- Parameters:
offset
- a int
-
filenameOffset
public void filenameOffset(int offset) filenameOffset.
- Parameters:
offset
- a int
-
subsepOffset
public void subsepOffset(int offset) subsepOffset.
- Parameters:
offset
- a int
-
convfmtOffset
public void convfmtOffset(int offset) convfmtOffset.
- Parameters:
offset
- a int
-
ofmtOffset
public void ofmtOffset(int offset) ofmtOffset.
- Parameters:
offset
- a int
-
environOffset
public void environOffset(int offset) environOffset.
- Parameters:
offset
- a int
-
argcOffset
public void argcOffset(int offset) argcOffset.
- Parameters:
offset
- a int
-
argvOffset
public void argvOffset(int offset) argvOffset.
- Parameters:
offset
- a int
-
applyRS
public void applyRS()applyRS.
-
function
function.
- Parameters:
func_name
- aString
objectnum_formal_params
- a int
-
callFunction
public void callFunction(HasFunctionAddress has_func_addr, String func_name, int num_formal_params, int num_actual_params) callFunction.
- Parameters:
has_func_addr
- aHasFunctionAddress
objectfunc_name
- aString
objectnum_formal_params
- a intnum_actual_params
- a int
-
setReturnResult
public void setReturnResult()setReturnResult.
-
returnFromFunction
public void returnFromFunction()returnFromFunction.
-
setNumGlobals
public void setNumGlobals(int num_globals) setNumGlobals.
- Parameters:
num_globals
- a int
-
close
public void close()close.
-
applySubsep
public void applySubsep(int count) applySubsep.
- Parameters:
count
- a int
-
deleteArrayElement
public void deleteArrayElement(int offset, boolean is_global) deleteArrayElement.
- Parameters:
offset
- a intis_global
- a boolean
-
deleteArray
public void deleteArray(int offset, boolean is_global) deleteArray.
- Parameters:
offset
- a intis_global
- a boolean
-
setExitAddress
setExitAddress.
- Parameters:
addr
- aAddress
object
-
setWithinEndBlocks
public void setWithinEndBlocks(boolean b) setWithinEndBlocks.
- Parameters:
b
- a boolean
-
exitWithCode
public void exitWithCode()exitWithCode.
-
exitWithoutCode
public void exitWithoutCode()exitWithCode.
-
regexp
regexp.
- Parameters:
regexp_str
- aString
object
-
conditionPair
public void conditionPair()regexpPair.
-
isIn
public void isIn()isIn.
-
castInt
public void castInt()castInt.
-
castDouble
public void castDouble()castDouble.
-
castString
public void castString()castString.
-
scriptThis
public void scriptThis()scriptThis.
-
extension
extension.
- Parameters:
extension_keyword
- aString
objectparam_count
- a intis_initial
- a boolean
-
dump
dump.
- Parameters:
ps
- aPrintStream
object
-
top
top.
- Returns:
- a
Position
object
-
postProcess
public void postProcess()Executed after all tuples are entered in the queue. Its main functions are:- Assign queue.next to the next element in the queue.
- Calls touch(...) per Tuple so that addresses can be normalized/assigned/allocated properly.
-
addGlobalVariableNameToOffsetMapping
Accept a {variable_name -> offset} mapping such that global variables can be assigned while processing name=value and filename command-line arguments.- Parameters:
varname
- Name of the global variableoffset
- What offset to use for the variableis_array
- Whether the variable is actually an array
-
setFunctionNameSet
Accept a set of function names from the parser. This is useful for invalidating name=value assignments from the command line parameters, either via -v arguments or passed into ARGV.- Parameters:
function_names
- A set of function name strings.
-
getGlobalVariableOffsetMap
getGlobalVariableOffsetMap.
- Returns:
- a
Map
object
-
getGlobalVariableAarrayMap
getGlobalVariableAarrayMap.
- Returns:
- a
Map
object
-
getFunctionNameSet
getFunctionNameSet.
- Returns:
- a
Set
object
-
pushSourceLineNumber
public void pushSourceLineNumber(int lineno) Push the current line number onto the line number stack. This is called by the parser to keep track of the current source line number. Keeping track of line numbers this way allows the runtime to report more meaningful errors by providing source line numbers within error reports.- Parameters:
lineno
- The current source line number.
-
popSourceLineNumber
public void popSourceLineNumber(int lineno) popSourceLineNumber.
- Parameters:
lineno
- a int
-