<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<phpdoc:classref xml:id="class.parle-lexer" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

 <title>The Parle\Lexer class</title>
 <titleabbrev>Parle\Lexer</titleabbrev>

 <partintro>

<!-- {{{ Parle\Lexer intro -->
  <section xml:id="parle-lexer.intro">
   &reftitle.intro;
   <para>
    Single state lexer class. Lexemes can be defined on the fly. If the particular lexer instance is meant to be used with <classname>Parle\Parser</classname>, the token IDs need to be taken from there. Otherwise, arbitrary token IDs can be supplied. This lexer can give a certain performance advantage over <classname>Parle\RLexer</classname>, if no multiple states are required. Note, that <classname>Parle\RParser</classname> is not compatible with this lexer.
   </para>
  </section>
<!-- }}} -->

  <section xml:id="parle-lexer.synopsis">
   &reftitle.classsynopsis;

<!-- {{{ Synopsis -->
   <classsynopsis>
    <ooclass><classname>Parle\Lexer</classname></ooclass>

<!-- {{{ Class synopsis -->
    <classsynopsisinfo>
     <ooclass>
      <classname>Parle\Lexer</classname>
     </ooclass>
    </classsynopsisinfo>
<!-- }}} -->
    <classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.constants.flag-regex-icase">Parle\Lexer::ICASE</varname>
     <initializer>1</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.constants.flag-regex-dot-not-lf">Parle\Lexer::DOT_NOT_LF</varname>
     <initializer>2</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.constants.flag-regex-dot-not-cr-lf">Parle\Lexer::DOT_NOT_CRLF</varname>
     <initializer>4</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.constants.flag-regex-skip-ws">Parle\Lexer::SKIP_WS</varname>
     <initializer>8</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.constants.flag-regex-match-zero-len">Parle\Lexer::MATCH_ZERO_LEN</varname>
     <initializer>16</initializer>
    </fieldsynopsis>

    <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
    <fieldsynopsis>
     <modifier>public</modifier>
     <type>bool</type>
     <varname linkend="parle-lexer.props.bol">bol</varname>
     <initializer>&false;</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>public</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.props.flags">flags</varname>
     <initializer>0</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>public</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.props.state">state</varname>
     <initializer>0</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>public</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.props.marker">marker</varname>
     <initializer>0</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>public</modifier>
     <type>int</type>
     <varname linkend="parle-lexer.props.cursor">cursor</varname>
     <initializer>0</initializer>
    </fieldsynopsis>

    <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.parle-lexer')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
   </classsynopsis>
<!-- }}} -->

  </section>

<!-- {{{ Parle\Lexer constants -->
  <section xml:id="parle-lexer.constants">
   &reftitle.constants;
   <variablelist>

    <varlistentry xml:id="parle-lexer.constants.flag-regex-icase">
     <term><constant>Parle\Lexer::ICASE</constant></term>
     <listitem>
      <para></para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="parle-lexer.constants.flag-regex-dot-not-lf">
     <term><constant>Parle\Lexer::DOT_NOT_LF</constant></term>
     <listitem>
      <para></para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="parle-lexer.constants.flag-regex-dot-not-cr-lf">
     <term><constant>Parle\Lexer::DOT_NOT_CRLF</constant></term>
     <listitem>
      <para></para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="parle-lexer.constants.flag-regex-skip-ws">
     <term><constant>Parle\Lexer::SKIP_WS</constant></term>
     <listitem>
      <para></para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="parle-lexer.constants.flag-regex-match-zero-len">
     <term><constant>Parle\Lexer::MATCH_ZERO_LEN</constant></term>
     <listitem>
      <para></para>
     </listitem>
    </varlistentry>

   </variablelist>
  </section>
<!-- }}} -->

<!-- {{{ Parle\Lexer properties -->
  <section xml:id="parle-lexer.props">
   &reftitle.properties;
   <variablelist>
    <varlistentry xml:id="parle-lexer.props.bol">
     <term><varname>bol</varname></term>
     <listitem>
      <para>Start of input flag.</para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="parle-lexer.props.flags">
     <term><varname>flags</varname></term>
     <listitem>
      <para>Lexer flags.</para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="parle-lexer.props.state">
     <term><varname>state</varname></term>
     <listitem>
      <para>Current lexer state, readonly.</para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="parle-lexer.props.marker">
     <term><varname>marker</varname></term>
     <listitem>
      <para>Position of the latest token match, readonly.</para>
     </listitem>
    </varlistentry>
    <varlistentry xml:id="parle-lexer.props.cursor">
     <term><varname>cursor</varname></term>
     <listitem>
      <para>Current input offset, readonly.</para>
     </listitem>
    </varlistentry>
   </variablelist>
  </section>
<!-- }}} -->

 </partintro>

 <!--&reference.parle.entities.parle-lexer;-->
 &reference.parle.parle.entities.lexer;

</phpdoc:classref>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
