Artifact Content
Not logged in

Artifact e1ae052f9e9d69b094a6dd31b5bd68f7e14d8608



<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>polemy.lex</title>
<link rel="stylesheet" type="text/css" href="candydoc/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="candydoc/ie56hack.css"><![endif]-->
<script language="JavaScript" src="candydoc/util.js" type="text/javascript"></script>
<script language="JavaScript" src="candydoc/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="candydoc/explorer.js" type="text/javascript"></script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("polemy.lex");</script>
	<table class="content">
		<tr><td id="docbody"><h1>polemy.lex</h1><!-- Generated by Ddoc from polemy\lex.d -->
<b>Authors:</b><br>
k.inaba
<br><br>
<b>License:</b><br>
NYSL 0.9982 http://www.kmonos.net/nysl/
<br><br>

 Lexer for Polemy programming language.<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">class 
<span class="currsymbol">Token</span>
<script>explorer.outline.addDecl('Token');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Represents a lexer token<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">immutable LexPosition 
<span class="currsymbol">pos</span>
<script>explorer.outline.addDecl('pos');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Position where the token occurred in the source<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">immutable string 
<span class="currsymbol">str</span>
<script>explorer.outline.addDecl('str');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>The token string itself<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">immutable bool 
<span class="currsymbol">quoted</span>
<script>explorer.outline.addDecl('quoted');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Was it a "
<span class="currsymbol">quoted</span>
<script>explorer.outline.addDecl('quoted');</script>

" token or unquoted?<br><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">Lexer 
<span class="currsymbol">lexerFromFile</span>
<script>explorer.outline.addDecl('lexerFromFile');</script>

(T...)(string <span class="funcparam">filename</span>, T <span class="funcparam">ln_cn</span>);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Named Construtors for Lexer<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">LexerT!(PositionedReader!(CharSeq)) 
<span class="currsymbol">lexerFromString</span>
<script>explorer.outline.addDecl('lexerFromString');</script>

(CharSeq)(CharSeq <span class="funcparam">str</span>, string <span class="funcparam">filename</span> = "&lt;unnamed&gt;", int <span class="funcparam">lineno</span> = 1, int <span class="funcparam">column</span> = 1);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Named Construtor for Lexer<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">alias 
<span class="currsymbol">Lexer</span>
<script>explorer.outline.addDecl('Lexer');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Standard 
<span class="currsymbol">Lexer</span>
<script>explorer.outline.addDecl('Lexer');</script>

 Type (all you have to know is that this is a forward range of Tokens!)<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">class 
<span class="currsymbol">LexerT</span>
<script>explorer.outline.addDecl('LexerT');</script>

(Reader) if (isForwardRange!(Reader) &amp;&amp; is(ElementType!(Reader) == dchar));
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Lexer Implementation<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">empty</span>
<script>explorer.outline.addDecl('empty');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">Token 
<span class="currsymbol">front</span>
<script>explorer.outline.addDecl('front');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">void 
<span class="currsymbol">popFront</span>
<script>explorer.outline.addDecl('popFront');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">typeof(this) 
<span class="currsymbol">save</span>
<script>explorer.outline.addDecl('save');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">struct 
<span class="currsymbol">PositionedReader</span>
<script>explorer.outline.addDecl('PositionedReader');</script>

(CharSeq) if (isForwardRange!(CharSeq) &amp;&amp; is(ElementType!(CharSeq) == dchar));
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Forward range for reader character by character,
 keeping track of position information and caring \r\n -&gt; \n conversion.<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">empty</span>
<script>explorer.outline.addDecl('empty');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">dchar 
<span class="currsymbol">front</span>
<script>explorer.outline.addDecl('front');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">void 
<span class="currsymbol">popFront</span>
<script>explorer.outline.addDecl('popFront');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">typeof(this) 
<span class="currsymbol">save</span>
<script>explorer.outline.addDecl('save');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Range primitive<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">const LexPosition 
<span class="currsymbol">currentPosition</span>
<script>explorer.outline.addDecl('currentPosition');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Get the current position<br><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</td></tr>
		<tr><td id="docfooter">
			Page was generated with
			<img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
			on Wed Nov 24 20:33:10 2010

		</td></tr>
	</table>
</div>
<script>
	explorer.packageExplorer.addModule("index");
	explorer.packageExplorer.addModule("main");
	explorer.packageExplorer.addModule("tricks.tricks");
	explorer.packageExplorer.addModule("tricks.test");
	explorer.packageExplorer.addModule("polemy._common");
	explorer.packageExplorer.addModule("polemy.failure");
	explorer.packageExplorer.addModule("polemy.layer");
	explorer.packageExplorer.addModule("polemy.fresh");
	explorer.packageExplorer.addModule("polemy.lex");
	explorer.packageExplorer.addModule("polemy.parse");
	explorer.packageExplorer.addModule("polemy.ast");
	explorer.packageExplorer.addModule("polemy.value");
	explorer.packageExplorer.addModule("polemy.valueconv");
	explorer.packageExplorer.addModule("polemy.eval");
	explorer.packageExplorer.addModule("polemy.runtime");
	explorer.packageExplorer.addModule("polemy.repl");</script>
</body></html>