Enum Opcode
- All Implemented Interfaces:
Serializable,Comparable<Opcode>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNumerically adds the top two elements of the stack with the result pushed onto the stack.Apply the RS variable by notifying the partitioning reader that there is a new regular expression to use when partitioning input records.Convert a list of array indices to a concatenated string with SUBSEP.Assign the ARGC variable offset.Assign the ARGV variable offset.Assigns the top-of-stack to a variable.Assigns an item to an array element.Assigns the top-of-stack to $0.Assigns an item as a particular input field; the field number can be 0.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.Call a user function.Checks whether the top-of-stack is of a particular class type; if not, an AwkRuntimeException is thrown.Close the specified file.Compares the top two stack elements; pushes 1 onto the stack if equal, 0 if not equal.Compares the top two stack elements; pushes 1 onto the stack if x1 > x2, 0 if not equal.Compares the top two stack elements; pushes 1 onto the stack if x1 < x2, 0 if not equal.Pop and concatenate two strings from the top-of-stack; push the result onto the stack.Returns a pair of regex patterns.Consume next line of input; assigning $0 and recalculating $1, $2, etc.Assign the CONVFMT variable offset.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.Decreases the variable reference by one; pushes the result onto the stack.Decreases the array element reference by one; pushes the result onto the stack.Decreases the input field variable by one; pushes the result onto the stack.Delete the specified array.Deletes an entry in an array.ConstantDEREF_ARRAY=336Obtains an item from the variable manager and push it onto the stack.Divides the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Divides the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.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.Numerically divides the top two elements of the stack with the result pushed onto the stack.Duplicates the top-of-stack on the stack.Assign the ENVIRON variable offset.Execute the specified AWK codeTerminates execution and returns specified exit code.Terminates execution without specifying an exit code.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.Call a function from an extensionAssign the FILENAME variable offset.Assign the FNR variable offset.Assign the FS variable offset.Define a user function.Removes an item from the key list (deque) and pushes it onto the operand stack.Push an input field onto the stack.Obtains input from stdin/filename-args and pushes input line and status code onto the stack.Jumps to a specified address.Pops and evaluates the top-of-stack; if false, it jumps to a specified address.Pops and evaluates the top-of-stack; if true, it jumps to a specified address.Increases the variable reference by one; pushes the result onto the stack.Increases the array element reference by one; pushes the result onto the stack.Increases the input field variable by one; pushes the result onto the stack.Built-in function that locates a substring within a source string and pushes the location onto the stack.Built-in function that pops the top-of-stack, removes its fractional part, if any, and places the result onto the stack.Tests whether the key list (deque) is empty; jumps to the argument address if empty, steps to the next instruction if not.Returns whether the specified key is in the array.Retrieves and pushes a set of keys from an associative array onto the stack.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.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.Built-in function that searches a string as input to a regular expression, the location of the match is pushed onto the stack.Applies a regular expression to the top stack element; pushes 1 if it matches, 0 if it does not match.Decreases the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Decreases the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.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.Numerically takes the modulus of the top two elements of the stack with the result pushed onto the stack.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.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.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.Multiplies the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Multiplies the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.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.Numerically multiplies the top two elements of the stack with the result pushed onto the stack.Evaluates the numerical NEGATION of the top stack element; pushes the result onto the stack.Assign the NF variable offset.A no-operation.Evaluates the logical NOT of the top stack element; pushes the result onto the stack.Assign the NR variable offset.Assign the OFMT variable offset.Assign the OFS variable offset.Assign the ORS variable offset.Increase the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack.Increase the contents of an indexed array by an adjustment value; assigns the result to the array and pushes the result onto the stack.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.Pops an item off the operand stack.Decreases the variable reference by one; pushes the original value onto the stack.Increases the variable reference by one; pushes the original value onto the stack.Numerically raises the top element to the power of the next element with the result pushed onto the stack.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.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.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.Prints N number of items that are on the operand stack.Prints N number of items that are on the operand stack to a specified file.Prints N number of items that are on the operand stack to a process executing a specified command (via a pipe).Performs a formatted print of N items that are on the operand stack.Performs a formatted print of N items that are on the operand stack to a specified file.Performs a formatted print of N items that are on the operand stack to a process executing a specified command (via a pipe).Pushes an item onto the operand stack.Obtains the next random number from the random number generator and push it onto the stack.Returns a regex pattern.Get the return value of the user function that was calledAssign the RLENGTH variable offset.Assign the RS variable offset.Assign the RSTART variable offset.Internal.Read stdin for simple AWK expression evaluation.Internal: sets the number of global variablesSets the return value of a user function.Internal.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.Built-in function to split a string by a regexp and put the components into an array.ConstantSPRINTF=270Built-in function that pops the top-of-stack, takes its square root, and places the result onto the stack.Seeds the random number generator.Built-in function that substitutes an occurrence (or all occurrences) of a string in a particular array cell and replaces it with another.Built-in function that substitutes an occurrence (or all occurrences) of a string in $0 and replaces it with another.Built-in function that substitutes an occurrence (or all occurrences) of a string in a field reference and replaces it with another.Built-in function that substitutes an occurrence (or all occurrences) of a string in a particular variable and replaces it with another.Assign the SUBSEP variable offset.Built-in function that pushes a substring of the top-of-stack onto the stack.Numerically subtracts the top two elements of the stack with the result pushed onto the stack.Swaps the top two elements of the stack.Built-in function that executes the top-of-stack as a system command and pushes the return code onto the stack.Deprecated.Converts the top-of-stack to a number.Built-in function that converts all the letters in the top-of-stack to lower case and pushes the result onto the stack.Built-in function that converts all the letters in the top-of-stack to upper case and pushes the result onto the stack.Converts the top stack element to a number; pushes the result onto the stack.Obtains input from a command (process) and pushes input line and status code onto the stack.Obtains input from a file and pushes input line and status code onto the stack. -
Method Summary
-
Enum Constant Details
-
POP
Pops an item off the operand stack.Stack before: x ...
Stack after: ... -
PUSH
Pushes an item onto the operand stack.Stack before: ...
Stack after: x ... -
IFFALSE
Pops and evaluates the top-of-stack; if false, it jumps to a specified address.Argument: address
Stack before: x ...
Stack after: ... -
TO_NUMBER
Converts the top-of-stack to a number.Stack before: x ...
Stack after: x (as a number) -
IFTRUE
Pops and evaluates the top-of-stack; if true, it jumps to a specified address.Argument: address
Stack before: x ...
Stack after: ... -
GOTO
Jumps to a specified address. The operand stack contents are unaffected. -
NOP
A no-operation. The operand stack contents are unaffected. -
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: ... -
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: ... -
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: ... -
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: ... -
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: ... -
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: ... -
SPRINTF
ConstantSPRINTF=270 -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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:
$0 would be recalculated. Likewise, if the following assignment were made:$3 = "hi"
$1, $2, ... would be recalculated.$0 = "hello there"
Stack before: field-num x ...
Stack after: x ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
RAND
Obtains the next random number from the random number generator and push it onto the stack.Stack before: ...
Stack after: random-number ... -
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 ... -
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) ... -
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) ... -
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) ... -
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) ... -
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) ... -
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) ... -
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 ... -
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 ... -
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: ... -
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: ... -
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: ... -
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: ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
SWAP
Swaps the top two elements of the stack.Stack before: x1 x2 ...
Stack after: x2 x1 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
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 ... -
INC_DOLLAR_REF
Increases the input field variable by one; pushes the result onto the stack.Stack before: field-idx ...
Stack after: x+1 -
DEC_DOLLAR_REF
Decreases the input field variable by one; pushes the result onto the stack.Stack before: field-idx ...
Stack after: x-1 -
DUP
Duplicates the top-of-stack on the stack.Stack before: x ...
Stack after: x x ... -
NOT
Evaluates the logical NOT of the top stack element; pushes the result onto the stack.Stack before: x ...
Stack after: !x ... -
NEGATE
Evaluates the numerical NEGATION of the top stack element; pushes the result onto the stack.Stack before: x ...
Stack after: -x ... -
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 -
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 -
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 -
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/) ... -
DEREF_ARRAY
ConstantDEREF_ARRAY=336 -
KEYLIST
Retrieves and pushes a set of keys from an associative array onto the stack. The set is stored in aDequefor iteration.Stack before: associative-array ...
Stack after: key-list-set ... -
IS_EMPTY_KEYLIST
Tests whether the key list (deque) 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: ... -
GET_FIRST_AND_REMOVE_FROM_KEYLIST
Removes an item from the key list (deque) and pushes it onto the operand stack.Stack before: key-list ...
Stack after: 1st-item ... -
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., java.util.Deque.class)
Stack before: obj ...
Stack after: obj ... -
GET_INPUT_FIELD
Push an input field onto the stack.Stack before: field-id ...
Stack after: x ... -
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
-
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 ... -
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 ... -
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 ... -
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
RSTART_OFFSET
Assign the RSTART variable offset. The AVM sets this variable while executing the match() builtin function.The operand stack is unaffected.
-
RLENGTH_OFFSET
Assign the RLENGTH variable offset. The AVM sets this variable while executing the match() builtin function.The operand stack is unaffected.
-
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.
-
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.
-
CONVFMT_OFFSET
Assign the CONVFMT variable offset. The AVM uses this variable while converting numbers to strings.The operand stack is unaffected.
-
OFMT_OFFSET
Assign the OFMT variable offset. The AVM uses this variable while converting numbers to strings for printing.The operand stack is unaffected.
-
ENVIRON_OFFSET
Assign the ENVIRON variable offset. The AVM provides environment variables through this array.The operand stack is unaffected.
-
ARGC_OFFSET
Assign the ARGC variable offset. The AVM provides the number of arguments via this variable.The operand stack is unaffected.
-
ARGV_OFFSET
Assign the ARGV variable offset. The AVM provides command-line arguments via this variable.The operand stack is unaffected.
-
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.
-
CALL_FUNCTION
Call a user function.Stack before: x1, x2, ..., xn
Stack after: f(x1, x2, ..., xn) -
FUNCTION
Define a user function.Stack remains unchanged
-
SET_RETURN_RESULT
Sets the return value of a user function.Stack before: x
Stack after: ... -
RETURN_FROM_FUNCTION
Get the return value of the user function that was calledStack before: ...
Stack after: x -
SET_NUM_GLOBALS
Internal: sets the number of global variables -
CLOSE
Close the specified file.Stack before: file name
Stack after: result of the close operation -
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" -
DELETE_ARRAY_ELEMENT
Deletes an entry in an array.Stack before: i
Stack after: ... -
SET_EXIT_ADDRESS
Internal.Stack remains unchanged.
-
SET_WITHIN_END_BLOCKS
Internal.Stack remains unchanged.
-
EXIT_WITH_CODE
Terminates execution and returns specified exit code.Stack before: integer
Stack after: N/A -
REGEXP
Returns a regex pattern.Stack before: ...
Stack after: the regex pattern object -
CONDITION_PAIR
Returns a pair of regex patterns.Stack before: pattern1, pattern2
Stack after: regex pair object -
IS_IN
Returns whether the specified key is in the array.Stack before: key, array
Stack after: true|false -
THIS
Deprecated. -
EXTENSION
Call a function from an extensionStack before: x1, x2, ..., xn
Stack after: f(x1, x2, ..., xn) -
EXEC
Execute the specified AWK codeStack before: script
Stack after: exit code of the script, or zero when successful, -1 when failed -
DELETE_ARRAY
Delete the specified array.Stack remains unchanged.
-
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) -
EXIT_WITHOUT_CODE
Terminates execution without specifying an exit code.Stack before: N/A
Stack after: N/A -
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.
-
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 -
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 -
SET_INPUT_FOR_EVAL
Read stdin for simple AWK expression evaluation.Stack before: ...
Stack after: ...
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromId
-