|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /usr/share/javadoc/java_cup/java_cup/ |
Upload File : |
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN" "../resources/xhtml11-target10.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>lexer (java_cup API)</title><script src="../resources/gjdoc.js" type="text/javascript"><!-- this comment required for konqueror 3.2.2 --></script><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><meta name="generator" content="GNU Gjdoc Standard Doclet"/><meta name="keywords" content="java_cup.lexer class"/><meta name="keywords" content="next_char"/><meta name="keywords" content="next_char2"/><meta name="keywords" content="next_char3"/><meta name="keywords" content="next_char4"/><meta name="keywords" content="EOF_CHAR"/><meta name="keywords" content="keywords"/><meta name="keywords" content="char_symbols"/><meta name="keywords" content="current_line"/><meta name="keywords" content="current_position"/><meta name="keywords" content="absolute_position"/><meta name="keywords" content="error_count"/><meta name="keywords" content="warning_count"/><meta name="keywords" content="init()"/><meta name="keywords" content="advance()"/><meta name="keywords" content="emit_error()"/><meta name="keywords" content="emit_warn()"/><meta name="keywords" content="id_start_char()"/><meta name="keywords" content="id_char()"/><meta name="keywords" content="find_single_char()"/><meta name="keywords" content="swallow_comment()"/><meta name="keywords" content="do_code_string()"/><meta name="keywords" content="do_id()"/><meta name="keywords" content="next_token()"/><meta name="keywords" content="debug_next_token()"/><meta name="keywords" content="real_next_token()"/><link rel="stylesheet" type="text/css" href="../resources/gjdochtml-clean-layout.css" title="GNU Clean"/><link rel="stylesheet" type="text/css" href="../resources/gjdochtml-clean-color1.css" title="GNU Clean"/></head><body class="content class" onload="if(parent.contentPageLoaded)parent.contentPageLoaded(document.title)"><table class="navbar div top"><tr><td class="navbar div top"><div class="navbar div top"><span class="navbar item enabled"><a href="../overview-summary.html">Overview</a></span> <span class="navbar item enabled"><a href="package-summary.html">Package</a></span> <span class="navbar item active">Class</span> <span class="navbar item enabled"><a href="lexer-uses.html">Use</a></span> <span class="navbar item enabled"><a href="tree.html">Tree</a></span> <span class="navbar item enabled"><a href="../alphaindex.html">Index</a></span> <span class="navbar item enabled"><a href="../deprecated.html">Deprecated</a></span> <span class="navbar item enabled"><a href="../about.html">About</a></span></div></td></tr><tr><td class="navi"><a href="../java_cup/lalr_transition.html">Prev Class</a> | <a href="../java_cup/lr_item_core.html">Next Class</a></td><td class="navi"><a href="../index.html" title="Show in a frameset" target="_top">Frames</a> | <a href="lexer.html" title="Show without frames" target="_top">No Frames</a> </td></tr><tr><td class="navi">Summary: Nested | <a href="#summary-fields">Field</a> | <a href="#summary-methods">Method</a> | Constr</td><td class="navi">Detail: Nested | <a href="#detail-fields">Field</a> | <a href="#detail-methods">Method</a> | Constr</td></tr></table><div class="class title outer"><h3 class="class title-package">java_cup</h3><h1 class="class title-class">Class lexer</h1></div><div class="class inheritance-tree"><ul class="inheritance 0"><li class="inheritance 0"><code>java.lang.Object</code></li><li><ul class="inheritance 1"><li class="inheritance 1"><code>java_cup.lexer</code></li><li></li></ul></li></ul></div><hr/><div class="class synopsis outer"><div class="class synopsis declaration"><code>public class <b class="class synopsis name">lexer</b></code></div><div class="class synopsis superclass"><code>extends java.lang.Object</code></div></div><hr/><div class="class description">This class implements a small scanner (aka lexical analyzer or lexer) for
the JavaCup specification. This scanner reads characters from standard
input (System.in) and returns integers corresponding to the terminal
number of the next Symbol. Once end of input is reached the EOF Symbol is
returned on every subsequent call.<p/>
Symbols currently returned include: <pre>
Symbol Constant Returned Symbol Constant Returned
------ ----------------- ------ -----------------
"package" PACKAGE "import" IMPORT
"code" CODE "action" ACTION
"parser" PARSER "terminal" TERMINAL
"non" NON "init" INIT
"scan" SCAN "with" WITH
"start" START "precedence" PRECEDENCE
"left" LEFT "right" RIGHT
"nonassoc" NONASSOC "%prec PRECENT_PREC
[ LBRACK ] RBRACK
; SEMI
, COMMA * STAR
. DOT : COLON
::= COLON_COLON_EQUALS | BAR
identifier ID {:...:} CODE_STRING
"nonterminal" NONTERMINAL
</pre>
All symbol constants are defined in sym.java which is generated by
JavaCup from parser.cup.<p/>
In addition to the scanner proper (called first via init() then with
next_token() to get each Symbol) this class provides simple error and
warning routines and keeps a count of errors and warnings that is
publicly accessible.<p/>
This class is "static" (i.e., it has only static members and methods).
</div><div class="taglet"><dl class="tag list"></dl><dt class="tag section header"><b>Version:</b></dt><dd>last updated: 7/3/96</dd></dl></div><div class="taglet"><dl class="tag list"><dt class="tag section header"><b>Author:</b></dt><dd class="tag item">Frank Flannery</dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><a name="summary-fields" id="summary-fields"/><dl class="table container"><dd><table class="class summary" border="1" width="100%"><tr class="table header"><td colspan="2"><h2 class="table header">Field Summary</h2></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#EOF_CHAR">EOF_CHAR</a></code></dt><dd class="description">EOF constant.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#absolute_position">absolute_position</a></code></dt><dd class="description">Character position in current line.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static Hashtable</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#char_symbols">char_symbols</a></code></dt><dd class="description">Table of single character symbols.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#current_line">current_line</a></code></dt><dd class="description">Current line number for use in error messages.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#current_position">current_position</a></code></dt><dd class="description">Character position in current line.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#error_count">error_count</a></code></dt><dd class="description">Count of total errors detected so far.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static Hashtable</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#keywords">keywords</a></code></dt><dd class="description">Table of keywords.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#next_char">next_char</a></code></dt><dd class="description">First character of lookahead.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#next_char2">next_char2</a></code></dt><dd class="description">Second character of lookahead.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#next_char3">next_char3</a></code></dt><dd class="description">Second character of lookahead.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#next_char4">next_char4</a></code></dt><dd class="description">Second character of lookahead.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#warning_count">warning_count</a></code></dt><dd class="description">Count of warnings issued so far </dd></dl></td></tr></table></dd></dl><a name="summary-methods" id="summary-methods"/><dl class="table container"><dd><table class="class summary" border="1" width="100%"><tr class="table header"><td colspan="2"><h2 class="table header">Method Summary</h2></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#advance()">advance</a>()</code></dt><dd class="description">Advance the scanner one character in the input stream.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#debug_next_token()">debug_next_token</a>()</code></dt><dd class="description">Debugging version of next_token().</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#do_code_string()">do_code_string</a>()</code></dt><dd class="description">Swallow up a code string.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#do_id()">do_id</a>()</code></dt><dd class="description">Process an identifier.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">static void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#emit_error(String)">emit_error</a>(String message)</code></dt><dd class="description">Emit an error message.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">static void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#emit_warn(String)">emit_warn</a>(String message)</code></dt><dd class="description">Emit a warning message.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static int</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#find_single_char(int)">find_single_char</a>(int ch)</code></dt><dd class="description">Try to look up a single character symbol, returns -1 for not found.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static boolean</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#id_char(int)">id_char</a>(int ch)</code></dt><dd class="description">Determine if a character is ok for the middle of an id.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static boolean</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#id_start_char(int)">id_start_char</a>(int ch)</code></dt><dd class="description">Determine if a character is ok to start an id.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">static void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#init()">init</a>()</code></dt><dd class="description">Initialize the scanner.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#next_token()">next_token</a>()</code></dt><dd class="description">Return one Symbol.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#real_next_token()">real_next_token</a>()</code></dt><dd class="description">The actual routine to return one Symbol.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected static void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#swallow_comment()">swallow_comment</a>()</code></dt><dd class="description">Handle swallowing up a comment.</dd></dl></td></tr></table></dd></dl><a name="detail-fields" id="detail-fields"/><h2 class="section header">Field Details</h2><div class="section"><a name="EOF_CHAR" id="EOF_CHAR"/><div class="member detail outer"><h3 class="member detail name">EOF_CHAR</h3><pre class="member detail synopsis">protected static final int EOF_CHAR</pre><blockquote class="member detail name"><div class="member detail description">EOF constant. </div><div class="member detail thrown list"><dl><dt class="member detail thrown header"><b>Field Value:</b></dt><dd class="member detail thrown item">-1</dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="absolute_position" id="absolute_position"/><div class="member detail outer"><h3 class="member detail name">absolute_position</h3><pre class="member detail synopsis">protected static int absolute_position</pre><blockquote class="member detail name"><div class="member detail description">Character position in current line. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="char_symbols" id="char_symbols"/><div class="member detail outer"><h3 class="member detail name">char_symbols</h3><pre class="member detail synopsis">protected static Hashtable char_symbols</pre><blockquote class="member detail name"><div class="member detail description">Table of single character symbols. For ease of implementation, we
store all unambiguous single character Symbols in this table of Integer
objects keyed by Integer objects with the numerical value of the
appropriate char (currently Character objects have a bug which precludes
their use in tables).
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="current_line" id="current_line"/><div class="member detail outer"><h3 class="member detail name">current_line</h3><pre class="member detail synopsis">protected static int current_line</pre><blockquote class="member detail name"><div class="member detail description">Current line number for use in error messages. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="current_position" id="current_position"/><div class="member detail outer"><h3 class="member detail name">current_position</h3><pre class="member detail synopsis">protected static int current_position</pre><blockquote class="member detail name"><div class="member detail description">Character position in current line. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="error_count" id="error_count"/><div class="member detail outer"><h3 class="member detail name">error_count</h3><pre class="member detail synopsis">public static int error_count</pre><blockquote class="member detail name"><div class="member detail description">Count of total errors detected so far. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="keywords" id="keywords"/><div class="member detail outer"><h3 class="member detail name">keywords</h3><pre class="member detail synopsis">protected static Hashtable keywords</pre><blockquote class="member detail name"><div class="member detail description">Table of keywords. Keywords are initially treated as identifiers.
Just before they are returned we look them up in this table to see if
they match one of the keywords. The string of the name is the key here,
which indexes Integer objects holding the symbol number.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="next_char" id="next_char"/><div class="member detail outer"><h3 class="member detail name">next_char</h3><pre class="member detail synopsis">protected static int next_char</pre><blockquote class="member detail name"><div class="member detail description">First character of lookahead. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="next_char2" id="next_char2"/><div class="member detail outer"><h3 class="member detail name">next_char2</h3><pre class="member detail synopsis">protected static int next_char2</pre><blockquote class="member detail name"><div class="member detail description">Second character of lookahead. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="next_char3" id="next_char3"/><div class="member detail outer"><h3 class="member detail name">next_char3</h3><pre class="member detail synopsis">protected static int next_char3</pre><blockquote class="member detail name"><div class="member detail description">Second character of lookahead. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="next_char4" id="next_char4"/><div class="member detail outer"><h3 class="member detail name">next_char4</h3><pre class="member detail synopsis">protected static int next_char4</pre><blockquote class="member detail name"><div class="member detail description">Second character of lookahead. </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="warning_count" id="warning_count"/><div class="member detail outer"><h3 class="member detail name">warning_count</h3><pre class="member detail synopsis">public static int warning_count</pre><blockquote class="member detail name"><div class="member detail description">Count of warnings issued so far </div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div></div><a name="detail-methods" id="detail-methods"/><h2 class="section header">Method Details</h2><div class="section"><a name="advance()" id="advance()"/><div class="member detail outer"><h3 class="member detail name">advance</h3><pre class="member detail synopsis">protected static void advance()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">Advance the scanner one character in the input stream. This moves
next_char2 to next_char and then reads a new next_char2.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="debug_next_token()" id="debug_next_token()"/><div class="member detail outer"><h3 class="member detail name">debug_next_token</h3><pre class="member detail synopsis">public static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a> debug_next_token()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">Debugging version of next_token(). This routine calls the real scanning
routine, prints a message on System.out indicating what the Symbol is,
then returns it.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="do_code_string()" id="do_code_string()"/><div class="member detail outer"><h3 class="member detail name">do_code_string</h3><pre class="member detail synopsis">protected static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a> do_code_string()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">Swallow up a code string. Code strings begin with "{:" and include
all characters up to the first occurrence of ":}" (there is no way to
include ":}" inside a code string). The routine returns a String
object suitable for return by the scanner.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="do_id()" id="do_id()"/><div class="member detail outer"><h3 class="member detail name">do_id</h3><pre class="member detail synopsis">protected static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a> do_id()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">Process an identifier. Identifiers begin with a letter, underscore,
or dollar sign, which is followed by zero or more letters, numbers,
underscores or dollar signs. This routine returns a String suitable
for return by the scanner.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="emit_error(String)" id="emit_error(String)"/><div class="member detail outer"><h3 class="member detail name">emit_error</h3><pre class="member detail synopsis">public static void emit_error(String message)</pre><blockquote class="member detail name"><div class="member detail description">Emit an error message. The message will be marked with both the
current line number and the position in the line. Error messages
are printed on standard error (System.err).
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">message</code><span class="separator"> - </span><span class="description">the message to print.</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="emit_warn(String)" id="emit_warn(String)"/><div class="member detail outer"><h3 class="member detail name">emit_warn</h3><pre class="member detail synopsis">public static void emit_warn(String message)</pre><blockquote class="member detail name"><div class="member detail description">Emit a warning message. The message will be marked with both the
current line number and the position in the line. Messages are
printed on standard error (System.err).
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">message</code><span class="separator"> - </span><span class="description">the message to print.</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="find_single_char(int)" id="find_single_char(int)"/><div class="member detail outer"><h3 class="member detail name">find_single_char</h3><pre class="member detail synopsis">protected static int find_single_char(int ch)</pre><blockquote class="member detail name"><div class="member detail description">Try to look up a single character symbol, returns -1 for not found.
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">ch</code><span class="separator"> - </span><span class="description">the character in question.</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="id_char(int)" id="id_char(int)"/><div class="member detail outer"><h3 class="member detail name">id_char</h3><pre class="member detail synopsis">protected static boolean id_char(int ch)</pre><blockquote class="member detail name"><div class="member detail description">Determine if a character is ok for the middle of an id.
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">ch</code><span class="separator"> - </span><span class="description">the character in question.</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="id_start_char(int)" id="id_start_char(int)"/><div class="member detail outer"><h3 class="member detail name">id_start_char</h3><pre class="member detail synopsis">protected static boolean id_start_char(int ch)</pre><blockquote class="member detail name"><div class="member detail description">Determine if a character is ok to start an id.
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">ch</code><span class="separator"> - </span><span class="description">the character in question.</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="init()" id="init()"/><div class="member detail outer"><h3 class="member detail name">init</h3><pre class="member detail synopsis">public static void init()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">Initialize the scanner. This sets up the keywords and char_symbols
tables and reads the first two characters of lookahead.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="next_token()" id="next_token()"/><div class="member detail outer"><h3 class="member detail name">next_token</h3><pre class="member detail synopsis">public static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a> next_token()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">Return one Symbol. This is the main external interface to the scanner.
It consumes sufficient characters to determine the next input Symbol
and returns it. To help with debugging, this routine actually calls
real_next_token() which does the work. If you need to debug the
parser, this can be changed to call debug_next_token() which prints
a debugging message before returning the Symbol.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="real_next_token()" id="real_next_token()"/><div class="member detail outer"><h3 class="member detail name">real_next_token</h3><pre class="member detail synopsis">protected static <a href="../java_cup/runtime/Symbol.html" title="Class in java_cup.runtime">Symbol</a> real_next_token()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">The actual routine to return one Symbol. This is normally called from
next_token(), but for debugging purposes can be called indirectly from
debug_next_token().
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="swallow_comment()" id="swallow_comment()"/><div class="member detail outer"><h3 class="member detail name">swallow_comment</h3><pre class="member detail synopsis">protected static void swallow_comment()
throws java.io.IOException</pre><blockquote class="member detail name"><div class="member detail description">Handle swallowing up a comment. Both old style C and new style C++
comments are handled.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div></div><p class="navbar bottom spacer"> </p><table class="navbar div bottom"><tr><td><div class="navbar div top"><span class="navbar item enabled"><a href="../overview-summary.html">Overview</a></span> <span class="navbar item enabled"><a href="package-summary.html">Package</a></span> <span class="navbar item active">Class</span> <span class="navbar item enabled"><a href="lexer-uses.html">Use</a></span> <span class="navbar item enabled"><a href="tree.html">Tree</a></span> <span class="navbar item enabled"><a href="../alphaindex.html">Index</a></span> <span class="navbar item enabled"><a href="../deprecated.html">Deprecated</a></span> <span class="navbar item enabled"><a href="../about.html">About</a></span></div></td></tr></table></body></html>