|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jawk.intermediate.AwkTuples
public class AwkTuples
Field Summary | |
---|---|
static int |
_ADD_
Numerically adds the top two elements of the stack with the result pushed onto the stack. |
static 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. |
static int |
_APPLY_SUBSEP_
|
static int |
_ARGC_OFFSET_
Assign the ARGC variable offset. |
static int |
_ARGV_OFFSET_
Assign the ARGV variable offset. |
static int |
_ASSIGN_
Assigns the top-of-stack to a variable. |
static int |
_ASSIGN_ARRAY_
Assigns an item to an array element. |
static int |
_ASSIGN_AS_INPUT_
Assigns the top-of-stack to $0. |
static int |
_ASSIGN_AS_INPUT_FIELD_
Assigns an item as a particular input field; the field number can be 0. |
static 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. |
static int |
_CALL_FUNCTION_
|
static int |
_CAST_DOUBLE_
|
static int |
_CAST_INT_
|
static int |
_CAST_STRING_
|
static int |
_CHECK_CLASS_
Checks whether the top-of-stack is of a particular class type; if not, an AwkRuntimeException is thrown. |
static int |
_CLOSE_
|
static int |
_CMP_EQ_
Compares the top two stack elements; pushes 1 onto the stack if equal, 0 if not equal. |
static int |
_CMP_GT_
Compares the top two stack elements; pushes 1 onto the stack if x1 > x2, 0 if not equal. |
static int |
_CMP_LT_
Compares the top two stack elements; pushes 1 onto the stack if x1 < x2, 0 if not equal. |
static int |
_CONCAT_
Pop and concatinate two strings from the top-of-stack; push the result onto the stack. |
static int |
_CONSUME_INPUT_
Consume next line of input; assigning $0 and recalculating $1, $2, etc. |
static int |
_CONVFMT_OFFSET_
Assign the CONVFMT variable offset. |
static 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. |
static int |
_DEC_
Decreases the variable reference by one; pushes the result onto the stack. |
static int |
_DEC_ARRAY_REF_
Decreases the array element reference by one; pushes the result onto the stack. |
static int |
_DEC_DOLLAR_REF_
Decreases the input field variable by one; pushes the result onto the stack. |
static int |
_DELETE_ARRAY_
|
static int |
_DELETE_ARRAY_ELEMENT_
|
static int |
_DEREF_ARRAY_
|
static int |
_DEREFERENCE_
Obtains an item from the variable manager and push it onto the stack. |
static 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. |
static 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. |
static 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. |
static int |
_DIVIDE_
Numerically divides the top two elements of the stack with the result pushed onto the stack. |
static int |
_DUMP_
|
static int |
_DUP_
Duplicates the top-of-stack on the stack. |
static int |
_ENVIRON_OFFSET_
Assign the ENVIRON variable offset. |
static int |
_EXEC_
|
static int |
_EXIT_WITH_CODE_
|
static 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. |
static int |
_EXTENSION_
|
static int |
_FILENAME_OFFSET_
Assign the FILENAME variable offset. |
static int |
_FNR_OFFSET_
Assign the FNR variable offset. |
static int |
_FS_OFFSET_
Assign the FS variable offset. |
static int |
_FUNCTION_
|
static int |
_GET_FIRST_AND_REMOVE_FROM_KEYLIST_
Removes an item from the KeyList (set) and pushes it onto the operand stack. |
static int |
_GET_INPUT_FIELD_
Push an input field onto the stack. |
static int |
_GETLINE_INPUT_
Obtains input from stdin/filename-args and pushes input line and status code onto the stack. |
static int |
_GOTO_
Jumps to a specified address. |
static int |
_IFFALSE_
Pops and evaluates the top-of-stack; if false, it jumps to a specified address. |
static int |
_IFTRUE_
Pops and evaluates the top-of-stack; if true, it jumps to a specified address. |
static int |
_INC_
Increases the variable reference by one; pushes the result onto the stack. |
static int |
_INC_ARRAY_REF_
Increases the array element reference by one; pushes the result onto the stack. |
static int |
_INC_DOLLAR_REF_
Increases the input field variable by one; pushes the result onto the stack. |
static int |
_INDEX_
Built-in function that locates a substring within a source string and pushes the location onto the stack. |
static int |
_INTFUNC_
Built-in function that pops the top-of-stack, removes its fractional part, if any, and places the result onto the stack. |
static 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. |
static int |
_IS_IN_
|
static int |
_KEYLIST_
Retrieves and pushes a Set of keys from an associative array onto the stack. |
static 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. |
static 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. |
static 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. |
static int |
_MATCHES_
Applies a regular expression to the top stack element; pushes 1 if it matches, 0 if it does not match. |
static 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. |
static 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. |
static 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. |
static int |
_MOD_
Numerically takes the modulus of the top two elements of the stack with the result pushed onto the stack. |
static int |
_MOD_EQ_
Takes the modulues of the contents of the variable by an adjustment value; assigns the result to the variable and pushes the result onto the stack. |
static 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. |
static 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. |
static 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. |
static 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. |
static 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. |
static int |
_MULTIPLY_
Numerically multiplies the top two elements of the stack with the result pushed onto the stack. |
static int |
_NEGATE_
Evalutes the numerical NEGATION of the top stack element; pushes the result onto the stack. |
static int |
_NF_OFFSET_
Assign the NF variable offset. |
static int |
_NOP_
A no-operation. |
static int |
_NOT_
Evaluates the logical NOT of the top stack element; pushes the result onto the stack. |
static int |
_NR_OFFSET_
Assign the NR variable offset. |
static int |
_OFMT_OFFSET_
Assign the OFMT variable offset. |
static int |
_OFS_OFFSET_
Assign the OFS variable offset. |
static 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. |
static 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. |
static 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. |
static int |
_POP_
Pops an item off the operand stack. |
static int |
_POW_
Numerically raises the top element to the power of the next element with the result pushed onto the stack. |
static 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. |
static 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. |
static 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. |
static int |
_PRINT_
Prints N number of items that are on the operand stack. |
static int |
_PRINT_TO_FILE_
Prints N number of items that are on the operand stack to a specified file. |
static 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). |
static int |
_PRINTF_
Performs a formatted print of N items that are on the operand stack. |
static int |
_PRINTF_TO_FILE_
Performs a formatted print of N items that are on the operand stack to a specified file. |
static 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). |
static int |
_PUSH_
Pushes an item onto the operand stack. |
static int |
_RAND_
Obtains the next random number from the random number generator and push it onto the stack. |
static int |
_REGEXP_
|
static int |
_REGEXP_PAIR_
|
static int |
_RETURN_FROM_FUNCTION_
|
static int |
_RLENGTH_OFFSET_
Assign the RLENGTH variable offset. |
static int |
_RS_OFFSET_
Assign the RS variable offset. |
static int |
_RSTART_OFFSET_
Assign the RSTART variable offset. |
static int |
_SET_EXIT_ADDRESS_
|
static int |
_SET_NUM_GLOBALS_
|
static int |
_SET_RETURN_RESULT_
|
static int |
_SET_WITHIN_END_BLOCKS_
|
static 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. |
static int |
_SLEEP_
Extension: Pauses the execution thread by N number of seconds. |
static int |
_SPLIT_
Built-in function to split a string by a regexp and put the components into an array. |
static int |
_SPRINTF_
|
static int |
_SQRT_
Built-in function that pops the top-of-stack, takes its square root, and places the result onto the stack. |
static int |
_SRAND_
Seeds the random number generator. |
static int |
_SUB_FOR_ARRAY_REFERENCE_
Built-in function that substitutes an occurance (or all occurances) of a string in a particular array cell and replaces it with another. |
static int |
_SUB_FOR_DOLLAR_0_
Built-in function that substitutes an occurance (or all occurances) of a string in $0 and replaces it with another. |
static int |
_SUB_FOR_DOLLAR_REFERENCE_
Built-in function that substitutes an occurance (or all occurances) of a string in a field reference and replaces it with another. |
static int |
_SUB_FOR_VARIABLE_
Built-in function that substitutes an occurance (or all occurances) of a string in a particular variable and replaces it with another. |
static int |
_SUBSEP_OFFSET_
Assign the SUBSEP variable offset. |
static int |
_SUBSTR_
Built-in function that pushes a substring of the top-of-stack onto the stack. |
static int |
_SUBTRACT_
Numerically subtracts the top two elements of the stack with the result pushed onto the stack. |
static int |
_SWAP_
Swaps the top two elements of the stack. |
static int |
_SYSTEM_
Built-in function that executes the top-of-stack as a system command and pushes the return code onto the stack. |
static int |
_THIS_
|
static int |
_TO_NUMBER_
Converts the top-of-stack to a number. |
static 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. |
static 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. |
static int |
_USE_AS_COMMAND_INPUT_
Obtains input from a command (process) and pushes input line and status code onto the stack. |
static int |
_USE_AS_FILE_INPUT_
Obtains input from a file and pushes input line and status code onto the stack. |
Constructor Summary | |
---|---|
AwkTuples()
|
Method Summary | |
---|---|
void |
add()
|
void |
addGlobalVariableNameToOffsetMapping(java.lang.String varname,
int offset,
boolean is_aarray)
Accept a {variable_name -> offset} mapping such that global variables can be assigned while processing name=value and filename command-line arguments. |
AwkTuples |
address(Address address)
|
void |
applyRS()
|
void |
applySubsep(int count)
|
void |
argcOffset(int offset)
|
void |
argvOffset(int offset)
|
void |
assign(int offset,
boolean is_global)
|
void |
assignArray(int offset,
boolean is_global)
|
void |
assignAsInput()
|
void |
assignAsInputField()
|
void |
atan2()
|
void |
callFunction(HasFunctionAddress has_func_addr,
java.lang.String func_name,
int num_formal_params,
int num_actual_params)
|
void |
castDouble()
|
void |
castInt()
|
void |
castString()
|
boolean |
checkClass(java.lang.Class cls)
|
void |
close()
|
void |
cmpEq()
|
void |
cmpGt()
|
void |
cmpLt()
|
void |
concat()
|
void |
consumeInput(Address address)
|
void |
convfmtOffset(int offset)
|
void |
cos()
|
Address |
createAddress(java.lang.String label)
|
void |
dec(int offset,
boolean is_global)
|
void |
decArrayRef(int offset,
boolean is_global)
|
void |
decDollarRef()
|
void |
deleteArray(int offset,
boolean is_global)
|
void |
deleteArrayElement(int offset,
boolean is_global)
|
void |
dereference(int offset,
boolean is_array,
boolean is_global)
|
void |
dereferenceArray()
|
void |
divEq(int offset,
boolean is_global)
|
void |
divEqArray(int offset,
boolean is_global)
|
void |
divEqInputField()
|
void |
divide()
|
void |
dump(int num_args)
|
void |
dump(java.io.PrintStream ps)
|
void |
dup()
|
void |
environOffset(int offset)
|
void |
exec()
|
void |
exitWithCode()
|
void |
exp()
|
void |
extension(java.lang.String extension_keyword,
int param_count,
boolean is_initial)
|
void |
filenameOffset(int offset)
|
void |
fnrOffset(int offset)
|
void |
fsOffset(int offset)
|
void |
function(java.lang.String func_name,
int num_formal_params)
|
void |
getFirstAndRemoveFromList()
|
java.util.Set<java.lang.String> |
getFunctionNameSet()
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getGlobalVariableAarrayMap()
|
java.util.Map<java.lang.String,java.lang.Integer> |
getGlobalVariableOffsetMap()
|
void |
getInputField()
|
void |
getlineInput()
|
void |
gotoAddress(Address address)
|
void |
ifFalse(Address address)
|
void |
ifTrue(Address address)
|
void |
inc(int offset,
boolean is_global)
|
void |
incArrayRef(int offset,
boolean is_global)
|
void |
incDollarRef()
|
void |
index()
|
void |
intFunc()
|
void |
isEmptyList(Address address)
|
void |
isIn()
|
void |
keylist()
|
void |
length(int num_exprs)
|
void |
log()
|
void |
match()
|
void |
matches()
|
void |
minusEq(int offset,
boolean is_global)
|
void |
minusEqArray(int offset,
boolean is_global)
|
void |
minusEqInputField()
|
void |
mod()
|
void |
modEq(int offset,
boolean is_global)
|
void |
modEqArray(int offset,
boolean is_global)
|
void |
modEqInputField()
|
void |
multEq(int offset,
boolean is_global)
|
void |
multEqArray(int offset,
boolean is_global)
|
void |
multEqInputField()
|
void |
multiply()
|
void |
negate()
|
void |
nfOffset(int offset)
|
void |
nop()
|
void |
not()
|
void |
nrOffset(int offset)
|
void |
ofmtOffset(int offset)
|
void |
ofsOffset(int offset)
|
void |
plusEq(int offset,
boolean is_global)
|
void |
plusEqArray(int offset,
boolean is_global)
|
void |
plusEqInputField()
|
void |
pop()
|
void |
popSourceLineNumber(int lineno)
|
void |
postProcess()
Executed after all tuples are entered in the queue. |
void |
pow()
|
void |
powEq(int offset,
boolean is_global)
|
void |
powEqArray(int offset,
boolean is_global)
|
void |
powEqInputField()
|
void |
print(int num_exprs)
|
void |
printf(int num_exprs)
|
void |
printfToFile(int num_exprs,
boolean append)
|
void |
printfToPipe(int num_exprs)
|
void |
printToFile(int num_exprs,
boolean append)
|
void |
printToPipe(int num_exprs)
|
void |
push(java.lang.Object o)
|
void |
pushSourceLineNumber(int lineno)
Push the current line number onto the line number stack. |
void |
rand()
|
void |
regexp(java.lang.String regexp_str)
|
void |
regexpPair()
|
void |
returnFromFunction()
|
void |
rlengthOffset(int offset)
|
void |
rsOffset(int offset)
|
void |
rstartOffset(int offset)
|
void |
scriptThis()
|
void |
setExitAddress(Address addr)
|
void |
setFunctionNameSet(java.util.Set<java.lang.String> function_names)
Accept a set of function names from the parser. |
void |
setNumGlobals(int num_globals)
|
void |
setReturnResult()
|
void |
setWithinEndBlocks(boolean b)
|
void |
sin()
|
void |
sleep(int num_args)
|
void |
split(int numargs)
|
void |
sprintf(int num_exprs)
|
void |
sqrt()
|
void |
srand(int num)
|
void |
subForArrayReference(int offset,
boolean is_global,
boolean is_gsub)
|
void |
subForDollar0(boolean is_gsub)
|
void |
subForDollarReference(boolean is_gsub)
|
void |
subForVariable(int offset,
boolean is_global,
boolean is_gsub)
|
void |
subsepOffset(int offset)
|
void |
substr(int numargs)
|
void |
subtract()
|
void |
swap()
|
void |
system()
|
void |
tolower()
|
void |
toNumber()
|
static java.lang.String |
toOpcodeString(int opcode)
|
Position |
top()
|
void |
toupper()
|
void |
useAsCommandInput()
|
void |
useAsFileInput()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int _POP_
Stack before: x ...
Stack after: ...
public static final int _PUSH_
Stack before: ...
Stack after: x ...
public static final int _IFFALSE_
Argument: address
Stack before: x ...
Stack after: ...
public static final int _TO_NUMBER_
Stack before: x ...
Stack after: x (as a number)
public static final int _IFTRUE_
Argument: address
Stack before: x ...
Stack after: ...
public static final int _GOTO_
public static final int _NOP_
public static final int _PRINT_
Argument: # of items (N)
Stack before: x1 x2 x3 .. xN ...
Stack after: ...
public static final int _PRINT_TO_FILE_
Argument 1: # of items (N)
Argument 2: true = append, false = overwrite
Stack before: x1 x2 x3 .. xN filename ...
Stack after: ...
public static final int _PRINT_TO_PIPE_
Argument: # of items (N)
Stack before: x1 x2 x3 .. xN command-string ...
Stack after: ...
public static final int _PRINTF_
Argument: # of items (N)
Stack before: x1 x2 x3 .. xN ...
Stack after: ...
public static final int _PRINTF_TO_FILE_
Argument 1: # of items (N)
Argument 2: true = append, false = overwrite
Stack before: x1 x2 x3 .. xN filename ...
Stack after: ...
public static final int _PRINTF_TO_PIPE_
Argument: # of items (N)
Stack before: x1 x2 x3 .. xN command-string ...
Stack after: ...
public static final int _SPRINTF_
public static final int _LENGTH_
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 ...
public static final int _CONCAT_
Stack before: x y ...
Stack after: x-concatenated-with-y ...
public static final int _ASSIGN_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: x ...
Stack after: x ...
public static final int _ASSIGN_ARRAY_
Argument 1: offset of the particular associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: index-into-array item ...
Stack after: item ...
public static final int _ASSIGN_AS_INPUT_
Stack before: x ...
Stack after: x ...
public static final int _ASSIGN_AS_INPUT_FIELD_
$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 ...
public static final int _DEREFERENCE_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: ...
Stack after: x ...
public static final int _PLUS_EQ_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: n ...
Stack after: x+n ...
public static final int _MINUS_EQ_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: n ...
Stack after: x-n ...
public static final int _MULT_EQ_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: n ...
Stack after: x*n ...
public static final int _DIV_EQ_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: n ...
Stack after: x/n ...
public static final int _MOD_EQ_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: n ...
Stack after: x%n ...
public static final int _POW_EQ_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: n ...
Stack after: x^n ...
public static final int _PLUS_EQ_ARRAY_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx n ...
Stack after: x+n ...
public static final int _MINUS_EQ_ARRAY_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx n ...
Stack after: x-n ...
public static final int _MULT_EQ_ARRAY_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx n ...
Stack after: x*n ...
public static final int _DIV_EQ_ARRAY_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx n ...
Stack after: x/n ...
public static final int _MOD_EQ_ARRAY_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx n ...
Stack after: x%n ...
public static final int _POW_EQ_ARRAY_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx n ...
Stack after: x^n ...
public static final int _PLUS_EQ_INPUT_FIELD_
Stack before: input-field_number n ...
Stack after: x+n ...
public static final int _MINUS_EQ_INPUT_FIELD_
Stack before: input-field_number n ...
Stack after: x-n ...
public static final int _MULT_EQ_INPUT_FIELD_
Stack before: input-field_number n ...
Stack after: x*n ...
public static final int _DIV_EQ_INPUT_FIELD_
Stack before: input-field_number n ...
Stack after: x/n ...
public static final int _MOD_EQ_INPUT_FIELD_
Stack before: input-field_number n ...
Stack after: x%n ...
public static final int _POW_EQ_INPUT_FIELD_
Stack before: input-field_number n ...
Stack after: x^n ...
public static final int _SRAND_
Argument: # of arguments
If # of arguments is 0:
Stack before: ...else
Stack after: old-seed ...
Stack before: x ...
Stack after: old-seed ...
public static final int _RAND_
Stack before: ...
Stack after: random-number ...
public static final int _INTFUNC_
Stack before: x ...
Stack after: (int)x ...
public static final int _SQRT_
Stack before: x ...
Stack after: sqrt(x) ...
public static final int _LOG_
Stack before: x ...
Stack after: log(x) ...
public static final int _EXP_
Stack before: x ...
Stack after: exp(x) ...
public static final int _SIN_
Stack before: x ...
Stack after: sin(x) ...
public static final int _COS_
Stack before: x ...
Stack after: cos(x) ...
public static final int _ATAN2_
Stack before: x1 x2 ...
Stack after: atan2(x1,x2) ...
public static final int _MATCH_
Stack before: string regexp ...
Stack after: RSTART ...
public static final int _INDEX_
Stack before: string substring ...
Stack after: location-index ...
public static final int _SUB_FOR_DOLLAR_0_
Argument: true if global sub, false otherwise.
Stack before: regexp replacement-string ...
Stack after: ...
public static final int _SUB_FOR_DOLLAR_REFERENCE_
Argument: true if global sub, false otherwise.
Stack before: field-num regexp replacement-string ...
Stack after: ...
public static final int _SUB_FOR_VARIABLE_
Argument 1: variable offset in variable manager
Argument 2: is global variable
Argument 3: is global sub
Stack before: regexp replacement-string orig-string ...
Stack after: ...
public static final int _SUB_FOR_ARRAY_REFERENCE_
Argument 1: array map offset in variable manager
Argument 2: is global array map
Argument 3: is global sub
Stack before: array-index regexp replacement-string orig-string ...
Stack after: ...
public static final int _SPLIT_
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 ...
public static final int _SUBSTR_
Argument: # of arguments
If # of arguments is 2:
Stack before: string startpos ...else
Stack after: substring ...
Stack before: string startpos endpos ...
Stack after: substring ...
public static final int _TOLOWER_
Stack before: STRING-ARGUMENT ...
Stack after: string-argument ...
public static final int _TOUPPER_
Stack before: string-argument ...
Stack after: STRING-ARGUMENT ...
public static final int _SYSTEM_
Stack before: cmd ...
Stack after: return-code ...
public static final int _SWAP_
Stack before: x1 x2 ...
Stack after: x2 x1 ...
public static final int _ADD_
Stack before: x1 x2 ...
Stack after: x1+x2 ...
public static final int _SUBTRACT_
Stack before: x1 x2 ...
Stack after: x1-x2 ...
public static final int _MULTIPLY_
Stack before: x1 x2 ...
Stack after: x1*x2 ...
public static final int _DIVIDE_
Stack before: x1 x2 ...
Stack after: x1/x2 ...
public static final int _MOD_
Stack before: x1 x2 ...
Stack after: x1%x2 ...
public static final int _POW_
Stack before: x1 x2 ...
Stack after: x1^x2 ...
public static final int _INC_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: ...
Stack after: x+1 ...
public static final int _DEC_
Argument 1: offset of the particular variable into the variable manager
Argument 2: whether the variable is global or local
Stack before: ...
Stack after: x-1 ...
public static final int _INC_ARRAY_REF_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx ...
Stack after: x+1 ...
public static final int _DEC_ARRAY_REF_
Argument 1: offset of the associative array into the variable manager
Argument 2: whether the associative array is global or local
Stack before: array-idx ...
Stack after: x-1 ...
public static final int _INC_DOLLAR_REF_
Stack before: field-idx ...
Stack after: x+1
public static final int _DEC_DOLLAR_REF_
Stack before: field-idx ...
Stack after: x-1
public static final int _DUP_
Stack before: x ...
Stack after: x x ...
public static final int _NOT_
Stack before: x ...
Stack after: !x ...
public static final int _NEGATE_
Stack before: x ...
Stack after: -x ...
public static final int _CMP_EQ_
Stack before: x1 x2 ...
Stack after: x1==x2
public static final int _CMP_LT_
Stack before: x1 x2 ...
Stack after: x1<x2
public static final int _CMP_GT_
Stack before: x1 x2 ...
Stack after: x1>x2
public static final int _MATCHES_
Stack before: x1 x2 ...
Stack after: (x1 ~ /x2/) ...
public static final int _SLEEP_
Stack before: N ...
Stack after: ...
public static final int _DUMP_
public static final int _DEREF_ARRAY_
public static final int _KEYLIST_
Stack before: associative-array ...
Stack after: keylist-set ...
public static final int _IS_EMPTY_KEYLIST_
Argument: jump-address-if-empty
Stack before: keylist ...
Stack after: ...
public static final int _GET_FIRST_AND_REMOVE_FROM_KEYLIST_
Stack before: keylist ...
Stack after: 1st-item ...
public static final int _CHECK_CLASS_
Argument: class-type (i.e., KeyList.class)
Stack before: obj ...
Stack after: obj ...
public static final int _GET_INPUT_FIELD_
Stack before: field-id ...
Stack after: x ...
public static final int _CONSUME_INPUT_
public static final int _GETLINE_INPUT_
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 ...
public static final int _USE_AS_FILE_INPUT_
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 ...
public static final int _USE_AS_COMMAND_INPUT_
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 ...
public static final int _NF_OFFSET_
The operand stack is unaffected.
public static final int _NR_OFFSET_
The operand stack is unaffected.
public static final int _FNR_OFFSET_
The operand stack is unaffected.
public static final int _FS_OFFSET_
The operand stack is unaffected.
public static final int _RS_OFFSET_
The operand stack is unaffected.
public static final int _OFS_OFFSET_
The operand stack is unaffected.
public static final int _RSTART_OFFSET_
The operand stack is unaffected.
public static final int _RLENGTH_OFFSET_
The operand stack is unaffected.
public static final int _FILENAME_OFFSET_
The operand stack is unaffected.
public static final int _SUBSEP_OFFSET_
The operand stack is unaffected.
public static final int _CONVFMT_OFFSET_
The operand stack is unaffected.
public static final int _OFMT_OFFSET_
The operand stack is unaffected.
public static final int _ENVIRON_OFFSET_
The operand stack is unaffected.
public static final int _ARGC_OFFSET_
The operand stack is unaffected.
public static final int _ARGV_OFFSET_
The operand stack is unaffected.
public static final int _APPLY_RS_
The stack remains unaffected.
public static final int _CALL_FUNCTION_
public static final int _FUNCTION_
public static final int _SET_RETURN_RESULT_
public static final int _RETURN_FROM_FUNCTION_
public static final int _SET_NUM_GLOBALS_
public static final int _CLOSE_
public static final int _APPLY_SUBSEP_
public static final int _DELETE_ARRAY_ELEMENT_
public static final int _SET_EXIT_ADDRESS_
public static final int _SET_WITHIN_END_BLOCKS_
public static final int _EXIT_WITH_CODE_
public static final int _REGEXP_
public static final int _REGEXP_PAIR_
public static final int _IS_IN_
public static final int _CAST_INT_
public static final int _CAST_DOUBLE_
public static final int _CAST_STRING_
public static final int _THIS_
public static final int _EXTENSION_
public static final int _EXEC_
public static final int _DELETE_ARRAY_
Constructor Detail |
---|
public AwkTuples()
Method Detail |
---|
public static java.lang.String toOpcodeString(int opcode)
public void pop()
public void push(java.lang.Object o)
public void ifFalse(Address address)
public void toNumber()
public void ifTrue(Address address)
public void gotoAddress(Address address)
public Address createAddress(java.lang.String label)
public AwkTuples address(Address address)
public void nop()
public void print(int num_exprs)
public void printToFile(int num_exprs, boolean append)
public void printToPipe(int num_exprs)
public void printf(int num_exprs)
public void printfToFile(int num_exprs, boolean append)
public void printfToPipe(int num_exprs)
public void sprintf(int num_exprs)
public void length(int num_exprs)
public void concat()
public void assign(int offset, boolean is_global)
public void assignArray(int offset, boolean is_global)
public void assignAsInput()
public void assignAsInputField()
public void dereference(int offset, boolean is_array, boolean is_global)
public void plusEq(int offset, boolean is_global)
public void minusEq(int offset, boolean is_global)
public void multEq(int offset, boolean is_global)
public void divEq(int offset, boolean is_global)
public void modEq(int offset, boolean is_global)
public void powEq(int offset, boolean is_global)
public void plusEqArray(int offset, boolean is_global)
public void minusEqArray(int offset, boolean is_global)
public void multEqArray(int offset, boolean is_global)
public void divEqArray(int offset, boolean is_global)
public void modEqArray(int offset, boolean is_global)
public void powEqArray(int offset, boolean is_global)
public void plusEqInputField()
public void minusEqInputField()
public void multEqInputField()
public void divEqInputField()
public void modEqInputField()
public void powEqInputField()
public void srand(int num)
public void rand()
public void intFunc()
public void sqrt()
public void log()
public void exp()
public void sin()
public void cos()
public void atan2()
public void match()
public void index()
public void subForDollar0(boolean is_gsub)
public void subForDollarReference(boolean is_gsub)
public void subForVariable(int offset, boolean is_global, boolean is_gsub)
public void subForArrayReference(int offset, boolean is_global, boolean is_gsub)
public void split(int numargs)
public void substr(int numargs)
public void tolower()
public void toupper()
public void system()
public void exec()
public void swap()
public void add()
public void subtract()
public void multiply()
public void divide()
public void mod()
public void pow()
public void inc(int offset, boolean is_global)
public void dec(int offset, boolean is_global)
public void incArrayRef(int offset, boolean is_global)
public void decArrayRef(int offset, boolean is_global)
public void incDollarRef()
public void decDollarRef()
public void dup()
public void not()
public void negate()
public void cmpEq()
public void cmpLt()
public void cmpGt()
public void matches()
public void sleep(int num_args)
public void dump(int num_args)
public void dereferenceArray()
public void keylist()
public void isEmptyList(Address address)
public void getFirstAndRemoveFromList()
public boolean checkClass(java.lang.Class cls)
public void getInputField()
public void consumeInput(Address address)
public void getlineInput()
public void useAsFileInput()
public void useAsCommandInput()
public void nfOffset(int offset)
public void nrOffset(int offset)
public void fnrOffset(int offset)
public void fsOffset(int offset)
public void rsOffset(int offset)
public void ofsOffset(int offset)
public void rstartOffset(int offset)
public void rlengthOffset(int offset)
public void filenameOffset(int offset)
public void subsepOffset(int offset)
public void convfmtOffset(int offset)
public void ofmtOffset(int offset)
public void environOffset(int offset)
public void argcOffset(int offset)
public void argvOffset(int offset)
public void applyRS()
public void function(java.lang.String func_name, int num_formal_params)
public void callFunction(HasFunctionAddress has_func_addr, java.lang.String func_name, int num_formal_params, int num_actual_params)
public void setReturnResult()
public void returnFromFunction()
public void setNumGlobals(int num_globals)
public void close()
public void applySubsep(int count)
public void deleteArrayElement(int offset, boolean is_global)
public void deleteArray(int offset, boolean is_global)
public void setExitAddress(Address addr)
public void setWithinEndBlocks(boolean b)
public void exitWithCode()
public void regexp(java.lang.String regexp_str)
public void regexpPair()
public void isIn()
public void castInt()
public void castDouble()
public void castString()
public void scriptThis()
public void extension(java.lang.String extension_keyword, int param_count, boolean is_initial)
public void dump(java.io.PrintStream ps)
public Position top()
public void postProcess()
public void addGlobalVariableNameToOffsetMapping(java.lang.String varname, int offset, boolean is_aarray)
public void setFunctionNameSet(java.util.Set<java.lang.String> function_names)
function_names
- A set of function name strings.public java.util.Map<java.lang.String,java.lang.Integer> getGlobalVariableOffsetMap()
public java.util.Map<java.lang.String,java.lang.Boolean> getGlobalVariableAarrayMap()
public java.util.Set<java.lang.String> getFunctionNameSet()
public void pushSourceLineNumber(int lineno)
lineno
- The current source line number.public void popSourceLineNumber(int lineno)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |