<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Farts::Lexer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Farts::Lexer</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/farts/farts_lexer_rb.html">
lib/farts/farts_lexer.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
StringScanner
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="diagram">
<map id="map" name="map">
<area shape="RECT" coords="613,113,701,161" href="SyntaxNode.html" alt="SyntaxNode
">
<area shape="RECT" coords="28,209,145,257" href="LiteralSyntaxNode.html" alt="LiteralSyntaxNode
">
<area shape="RECT" coords="169,209,297,257" href="ProgramSyntaxNode.html" alt="ProgramSyntaxNode
">
<area shape="RECT" coords="321,209,425,257" href="CallSyntaxNode.html" alt="CallSyntaxNode
">
<area shape="RECT" coords="449,209,580,257" href="CommentSyntaxNode.html" alt="CommentSyntaxNode
">
<area shape="RECT" coords="604,209,710,257" href="EndSyntaxNode.html" alt="EndSyntaxNode
">
<area shape="RECT" coords="734,209,865,257" href="AttributeSyntaxNode.html" alt="AttributeSyntaxNode
">
<area shape="RECT" coords="889,209,1020,257" href="LocalVarSyntaxNode.html" alt="LocalVarSyntaxNode
">
<area shape="RECT" coords="1044,209,1137,257" href="IfSyntaxNode.html" alt="IfSyntaxNode
">
<area shape="RECT" coords="1161,209,1294,257" href="CommandSyntaxNode.html" alt="CommandSyntaxNode
">
<area shape="RECT" coords="377,17,468,65" href="../Racc/Parser.html" alt="Racc::Parser
">
<area shape="RECT" coords="386,113,458,161" href="Parser.html" alt="Parser
">
<area shape="RECT" coords="496,17,594,65" href="../StringScanner.html" alt="StringScanner
">
<area shape="RECT" coords="509,113,581,161" href="Lexer.html" alt="Lexer
">
<area shape="RECT" coords="192,113,269,161" href="Interpreter.html" alt="Interpreter
">
<area shape="RECT" coords="32,113,104,161" href="Lib.html" alt="Lib
">
<area shape="RECT" coords="17,91,1305,268" href="../Farts.html" alt="Farts
">
</map>
<img src="../../dot/m_23_0.png" usemap="#map" border=0 alt="Module: Farts">
</div>
<div id="description">
<p>
The <a href="Lexer.html">Lexer</a> class converts the text of a program to
tokens
</p>
<dl>
<dt><tt>token</tt></dt><dd>is the current token being assembled
</dd>
</dl>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000350">lineno</a>
<a href="#M000347">new</a>
<a href="#M000348">next_token</a>
<a href="#M000349">tokenpos</a>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">Keywords</td>
<td>=</td>
<td class="context-item-value">%w(if else endif and or end args actor this true false)</td>
<td width="3em"> </td>
<td class="context-item-desc">
Table of keywords and token type values
</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000347" class="method-detail">
<a name="M000347"></a>
<div class="method-heading">
<a href="Lexer.src/M000347.html" target="Code" class="method-signature"
onclick="popupCode('Lexer.src/M000347.html');return false;">
<span class="method-name">new</span><span class="method-args">(str)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000350" class="method-detail">
<a name="M000350"></a>
<div class="method-heading">
<a href="Lexer.src/M000350.html" target="Code" class="method-signature"
onclick="popupCode('Lexer.src/M000350.html');return false;">
<span class="method-name">lineno</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000348" class="method-detail">
<a name="M000348"></a>
<div class="method-heading">
<a href="Lexer.src/M000348.html" target="Code" class="method-signature"
onclick="popupCode('Lexer.src/M000348.html');return false;">
<span class="method-name">next_token</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000349" class="method-detail">
<a name="M000349"></a>
<div class="method-heading">
<a href="Lexer.src/M000349.html" target="Code" class="method-signature"
onclick="popupCode('Lexer.src/M000349.html');return false;">
<span class="method-name">tokenpos</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>