## org.eclipse.datatools.enablement.sybase.parser
Class AbstractQuickSQLParser

    java.lang.Object
      org.eclipse.datatools.enablement.sybase.parser.AbstractQuickSQLParser

Direct Known Subclasses:
  QuickSQLParser

    public abstract class AbstractQuickSQLParser

extends java.lang.Object

Author:
  Hui Cao

Field Summary
`static int` `CREATE_EVENT_HEADER_PATTERN`
`static int` `CREATE_FUNC_HEADER_PATTERN`
`static int` `CREATE_PROC_HEADER_PATTERN`
`static int` `CREATE_TRIGGER_HEADER_PATTERN`

Constructor Summary
`AbstractQuickSQLParser()`

Method Summary
`int[]` `find(java.lang.String input, java.lang.String[] tokens)`
`abstract int[]` `find(java.lang.String input, java.lang.String[][] tokens)`
`abstract java.lang.String[]` `getDatatypeInfo(java.lang.String input)`
`int` `getEndIndex(Token t)` Gets the end index of a Token for a String input.
`abstract java.lang.String` `getInput()`
`abstract java.lang.String[][]` `getParameters(java.lang.String input)`
`int` `getStartIndex(Token t)` Gets the start index of a Token for a String input.
`abstract Token[]` `getTokens(java.lang.String input, java.lang.String[][] tokens)`
`abstract boolean` `match(java.lang.String input, int pattern)` Matches the input string against the given pattern and returns the matching strings.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CREATE_PROC_HEADER_PATTERN

    public static final int CREATE_PROC_HEADER_PATTERN

See Also:
  Constant Field Values

### CREATE_FUNC_HEADER_PATTERN

    public static final int CREATE_FUNC_HEADER_PATTERN

See Also:
  Constant Field Values

### CREATE_TRIGGER_HEADER_PATTERN

    public static final int CREATE_TRIGGER_HEADER_PATTERN

See Also:
  Constant Field Values

### CREATE_EVENT_HEADER_PATTERN

    public static final int CREATE_EVENT_HEADER_PATTERN

See Also:
  Constant Field Values

Constructor Detail

### AbstractQuickSQLParser

    public AbstractQuickSQLParser()

Method Detail

### match

    public abstract boolean match(java.lang.String input,
                                  int pattern)

  Matches the input string against the given pattern and returns the matching strings.

  Parameters:
    `input` - string to be parsed
    `pattern` - pattern constant
  Returns:
    null or the matching strings

### find

    public int[] find(java.lang.String input,
                      java.lang.String[] tokens)

  Parameters:
    `input` -
    `tokens` -
  Returns:
    start and end index: start points to the first character of the token; end points to the last + 1 character.

### find

    public abstract int[] find(java.lang.String input,
                               java.lang.String[][] tokens)

### getTokens

    public abstract Token[] getTokens(java.lang.String input,
                                      java.lang.String[][] tokens)

### getParameters

    public abstract java.lang.String[][] getParameters(java.lang.String input)

### getDatatypeInfo

    public abstract java.lang.String[] getDatatypeInfo(java.lang.String input)

### getStartIndex

    public int getStartIndex(Token t)

  Gets the start index of a Token for a String input. Clients of this API should create a new parser instead of using the shared instance to avoid concurrent access.

### getEndIndex

    public int getEndIndex(Token t)

  Gets the end index of a Token for a String input. Clients of this API should create a new parser instead of using the shared instance to avoid concurrent access.

### getInput

    public abstract java.lang.String getInput()