platypus
Class Tokens

java.lang.Object
  extended by platypus.Tokens

public class Tokens
extends java.lang.Object

Convenience class for handling an array of tokens (that constitute an input line)


Field Summary
private  GDD gdd
           
private  GID gid
           
private  Literals lits
           
private  Token[] toks
           
 
Constructor Summary
Tokens(int size)
           
 
Method Summary
 int addToken(Token t, int index)
          Add a token to the Tokens array
 Token[] getToks()
           
 int process()
          Process the tokens in the array gid.tokens at a basic level: line number, text, and commands are all dispatched to the routines that process them further.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

toks

private final Token[] toks

gdd

private final GDD gdd

gid

private final GID gid

lits

private final Literals lits
Constructor Detail

Tokens

public Tokens(int size)
Method Detail

addToken

public int addToken(Token t,
                    int index)
Add a token to the Tokens array

Parameters:
t - the token to add
index - where to add it in the array
Returns:
index where added if successful; an error Status if an error occurs.

process

public int process()
Process the tokens in the array gid.tokens at a basic level: line number, text, and commands are all dispatched to the routines that process them further.

Returns:
Status.OK if all is well, otherwise an error status.

getToks

public Token[] getToks()


Copyright © 2006-7 Pacific Data Works LLC