com.holub.text
Interface Token

All Known Implementing Classes:
BeginToken, RegexToken, SimpleToken, WordToken

public interface Token

An input token (a lexical symbol in the input stream).

©2004 Allen I. Holub. All rights reserved.

This code may be used freely by yourself with the following restrictions:

  1. Your splash screen, about box, or equivalent, must include Allen Holub's name, copyright, and URL. For example:

    This program contains Allen Holub's SQL package.
    (c) 2005 Allen I. Holub. All Rights Reserved.
    http://www.holub.com


    If your program does not run interactively, then the foregoing notice must appear in your documentation.
  2. You may not redistribute (or mirror) the source code.
  3. You must report any bugs that you find to me. Use the form at http://www.holub.com/company/contact.html or send email.
  4. The software is supplied as is. Neither Allen Holub nor Holub Associates are responsible for any bugs (or any problems caused by bugs, including lost productivity or data) in any of this code.

Method Summary
 String lexeme()
          Returns the input string that matched the token specification.
 boolean match(String input, int offset)
          Returns true if the sequence at the indicated offset from the beginning of the indicated input string matches the current token.
 

Method Detail

match

boolean match(String input,
              int offset)
Returns true if the sequence at the indicated offset from the beginning of the indicated input string matches the current token.


lexeme

String lexeme()
Returns the input string that matched the token specification.