Sync with changes for parle-0.7.0

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343168 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Anatol Belski 2017-10-01 17:59:44 +00:00
parent a468efb805
commit 73af09be58
28 changed files with 1610 additions and 44 deletions

View file

@ -24,6 +24,7 @@
&reference.parle.parle.lexer;
&reference.parle.parle.rlexer;
&reference.parle.parle.parser;
&reference.parle.parle.rparser;
&reference.parle.parle.stack;
&reference.parle.parle.token;
&reference.parle.parle.errorinfo;

View file

@ -12,7 +12,7 @@
<section xml:id="parle-lexer.intro">
&reftitle.intro;
<para>
Base 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.
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>
<!-- }}} -->

View file

@ -12,7 +12,7 @@
<section xml:id="parle-rlexer.intro">
&reftitle.intro;
<para>
Recursive lexer class. Any sub states can be added on the fly to match recursive patterns. Though, sometimes it might be simpler to use an instance of <classname>Parle\Lexer</classname> and define some parser grammar.
Multistate lexer class. Lexemes can be defined on the fly. If the particular lexer instance is meant to be used with <classname>Parle\RParser</classname>, the token IDs need to be taken from there. Otherwise, arbitrary token IDs can be supplied. Note, that <classname>Parle\Parser</classname> is not compatible with this lexer.
</para>
</section>
<!-- }}} -->
@ -29,11 +29,6 @@
<ooclass>
<classname>Parle\RLexer</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>Parle\Lexer</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">Constants</classsynopsisinfo>
@ -87,13 +82,21 @@
<varname linkend="parle-rlexer.props.state">state</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>integer</type>
<varname linkend="parle-rlexer.props.marker">marker</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>integer</type>
<varname linkend="parle-rlexer.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-rlexer')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.parle-rlexer')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
</classsynopsis>
<!-- }}} -->
@ -165,6 +168,18 @@
<para>Current lexer state, readonly.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rlexer.props.marker">
<term><varname>marker</varname></term>
<listitem>
<para>Position of the latest token match, readonly.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rlexer.props.cursor">
<term><varname>cursor</varname></term>
<listitem>
<para>Current input offset, readonly.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->

View file

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343137 $ -->
<phpdoc:classref xml:id="class.parle-rparser" 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\RParser class</title>
<titleabbrev>Parle\RParser</titleabbrev>
<partintro>
<!-- {{{ Parle\RParser intro -->
<section xml:id="parle-rparser.intro">
&reftitle.intro;
<para>
Parser class. Rules can be defined on the fly. Once finalized, a <classname>Parle\RLexer</classname> instance is required to deliver the token stream.
</para>
</section>
<!-- }}} -->
<section xml:id="parle-rparser.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>Parle\RParser</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>Parle\RParser</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">Constants</classsynopsisinfo>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.action-error">Parle\RParser::ACTION_ERROR</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.action-shift">Parle\RParser::ACTION_SHIFT</varname>
<initializer>1</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.action-reduce">Parle\RParser::ACTION_REDUCE</varname>
<initializer>2</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.action-goto">Parle\RParser::ACTION_GOTO</varname>
<initializer>3</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.action-accept">Parle\RParser::ACTION_ACCEPT</varname>
<initializer>4</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.error-syntax">Parle\RParser::ERROR_SYNTAX</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.error-non-associative">Parle\RParser::ERROR_NON_ASSOCIATIVE</varname>
<initializer>1</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
<varname linkend="parle-rparser.constants.error-unkown-token">Parle\RParser::ERROR_UNKOWN_TOKEN</varname>
<initializer>2</initializer>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<type>integer</type>
<varname linkend="parle-rparser.props.action">action</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>integer</type>
<varname linkend="parle-rparser.props.reduceId">reduceId</varname>
<initializer>0</initializer>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.parle-rparser')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
</classsynopsis>
<!-- }}} -->
</section>
<!-- {{{ Parle\RParser constants -->
<section xml:id="parle-rparser.constants">
&reftitle.constants;
<variablelist>
<varlistentry xml:id="parle-rparser.constants.action-error">
<term><constant>Parle\RParser::ACTION_ERROR</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.constants.action-shift">
<term><constant>Parle\RParser::ACTION_SHIFT</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.constants.action-reduce">
<term><constant>Parle\RParser::ACTION_REDUCE</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.constants.action-goto">
<term><constant>Parle\RParser::ACTION_GOTO</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.constants.action-accept">
<term><constant>Parle\RParser::ACTION_ACCEPT</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.constants.error-syntax">
<term><constant>Parle\RParser::ERROR_SYNTAX</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.constants.error-non-associative">
<term><constant>Parle\RParser::ERROR_NON_ASSOCIATIVE</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.constants.error-unkown-token">
<term><constant>Parle\RParser::ERROR_UNKOWN_TOKEN</constant></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
<!-- {{{ Parle\RParser properties -->
<section xml:id="parle-rparser.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="parle-rparser.props.action">
<term><varname>action</varname></term>
<listitem>
<para>Current parser action that matches one of the action class constants, readonly.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="parle-rparser.props.reduceId">
<term><varname>reduceId</varname></term>
<listitem>
<para>Grammar rule id just processed in the reduce action. The value corresponds either to a token or to a production id. Readonly.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
</partintro>
<!--&reference.parle.entities.parle-rparser;-->
&reference.parle.parle.entities.rparser;
</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
-->

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rlexer.advance" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RLexer::advance</refname>
<refpurpose>Process next lexer rule</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RLexer::advance</methodname>
<void />
</methodsynopsis>
<para>
Processes the next rule and prepares the resulting token data.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rlexer.build" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RLexer::build</refname>
<refpurpose>Finalize the lexer rule set</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RLexer::build</methodname>
<void />
</methodsynopsis>
<para>
Rules, previously added with <methodname>Parle\RLexer::push</methodname> are finalized. This method call has to be done after all the necessary rules was pushed. The rule set becomes read only. The lexing can begin.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rlexer.consume" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RLexer::consume</refname>
<refpurpose>Pass the data for processing</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RLexer::consume</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
Consume the data for lexing.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
Data to be lexed.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rlexer.dump" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RLexer::dump</refname>
<refpurpose>Dump the state machine</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RLexer::dump</methodname>
<void />
</methodsynopsis>
<para>
Dump the current state machine to stdout.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rlexer.gettoken" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RLexer::getToken</refname>
<refpurpose>Retrieve the current token</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>Parle\Token</type><methodname>Parle\RLexer::getToken</methodname>
<void />
</methodsynopsis>
<para>
Retrive the current token.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an instance of <classname>Parle\Token</classname>.
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343100 $ -->
<refentry xml:id="parle-rlexer.insertmacro" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RLexer::insertMacro</refname>
<refpurpose>Insert regex macro</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RLexer::insertMacro</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>string</type><parameter>regex</parameter></methodparam>
</methodsynopsis>
<para>
Insert a regex macro, that can be later used as a shortcut and included in other regular expressions.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
Name of the macros.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>regex</parameter></term>
<listitem>
<para>
Regular expression.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -10,25 +10,11 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\Lexer::push</methodname>
<modifier>public</modifier> <type>void</type><methodname>Parle\RLexer::push</methodname>
<methodparam><type>string</type><parameter>regex</parameter></methodparam>
<methodparam><type>integer</type><parameter>id</parameter></methodparam>
<!--<methodparam choice="opt"><type>integer</type><parameter>userId</parameter></methodparam>-->
</methodsynopsis>
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\Lexer::push</methodname>
<methodparam><type>string</type><parameter>state</parameter></methodparam>
<methodparam><type>string</type><parameter>regex</parameter></methodparam>
<methodparam><type>integer</type><parameter>id</parameter></methodparam>
<methodparam><type>string</type><parameter>newState</parameter></methodparam>
<!--<methodparam choice="opt"><type>integer</type><parameter>userId</parameter></methodparam>-->
</methodsynopsis>
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\Lexer::push</methodname>
<methodparam><type>string</type><parameter>state</parameter></methodparam>
<methodparam><type>string</type><parameter>regex</parameter></methodparam>
<methodparam><type>string</type><parameter>newState</parameter></methodparam>
</methodsynopsis>
<para>
Push a pattern for lexeme recognition.
</para>
@ -53,22 +39,6 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>state</parameter></term>
<listitem>
<para>
State name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newState</parameter></term>
<listitem>
<para>
New state name, after the rule was applied.
</para>
</listitem>
</varlistentry>
<!--<varlistentry>
<term><parameter>userId</parameter></term>
<listitem>
@ -83,7 +53,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
&return.void;
</para>
</refsect1>

View file

@ -14,7 +14,7 @@
<methodparam><type>string</type><parameter>state</parameter></methodparam>
</methodsynopsis>
<para>
A lexer can have more than one state machine. This allows you to lex different tokens depending on context, thus allowing simple parsing to take place. To allow this, a 'start state' must be specified additionally at the beginning of the <methodname>Parle\RLexer::push</methodname> call and an 'exit state' at the end. If '*' is used as start state, then the rule is applied to all lexer states. If '.' is specified as the exit state, then the lexer state is unchanged when that rule matches.
This lexer type can have more than one state machine. This allows you to lex different tokens depending on context, thus allowing simple parsing to take place. To allow this, a 'start state' must be specified additionally at the beginning of the <methodname>Parle\RLexer::push</methodname> call and an 'exit state' at the end. If '*' is used as start state, then the rule is applied to all lexer states. If '.' is specified as the exit state, then the lexer state is unchanged when that rule matches.
</para>
</refsect1>

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rlexer.restart" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RLexer::restart</refname>
<refpurpose>Restart lexer</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RLexer::restart</methodname>
<methodparam><type>integer</type><parameter>pos</parameter></methodparam>
</methodsynopsis>
<para>
Restart lexing optionally supplying the desired offset.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>pos</parameter></term>
<listitem>
<para>
Restart position.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.advance" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::advance</refname>
<refpurpose>Process next parser rule</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::advance</methodname>
<void />
</methodsynopsis>
<para>
Prosess next parser rule.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.build" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::build</refname>
<refpurpose>Finalize the grammar rules</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::build</methodname>
<void />
</methodsynopsis>
<para>
Any tokens and grammar rules previously added are finalized. The rule set becomes readonly and the parser is ready to start.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.consume" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::consume</refname>
<refpurpose>Consume the data for processing</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::consume</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>mixed</type><parameter>rlexer</parameter></methodparam>
</methodsynopsis>
<para>
Consume the data for parsing.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
Data to be parsed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lexer</parameter></term>
<listitem>
<para>
A lexer object containing the lexing rules prepared for the particular grammar.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.dump" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::dump</refname>
<refpurpose>Dump the grammar</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::dump</methodname>
<void />
</methodsynopsis>
<para>
Dump the current grammar to stdout.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.errorinfo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::errorInfo</refname>
<refpurpose>Retrieve the error information</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>Parle\ErrorInfo</type><methodname>Parle\RParser::errorInfo</methodname>
<void />
</methodsynopsis>
<para>
Retrieve the error information in case <methodname>Parle\RParser::action</methodname> returned the error action.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an instance of <classname>Parle\ErrorInfo</classname>.
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343087 $ -->
<refentry xml:id="parle-rparser.left" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::left</refname>
<refpurpose>Declare a token with left-associativity</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::left</methodname>
<methodparam><type>string</type><parameter>tok</parameter></methodparam>
</methodsynopsis>
<para>
Declare a terminal with left associativity.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>tok</parameter></term>
<listitem>
<para>
Token name.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343087 $ -->
<refentry xml:id="parle-rparser.nonassoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::nonassoc</refname>
<refpurpose>Declare a token with no associativity</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::nonassoc</methodname>
<methodparam><type>string</type><parameter>tok</parameter></methodparam>
</methodsynopsis>
<para>
Declare a terminal, that cannot appear more than once in the row.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>tok</parameter></term>
<listitem>
<para>
Token name.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.precedence" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::precedence</refname>
<refpurpose>Declare a precedence rule</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::precedence</methodname>
<methodparam><type>string</type><parameter>tok</parameter></methodparam>
</methodsynopsis>
<para>
Declares a precedence rule for a fictious terminal symbol. This rule can be later used in the specific grammar rules.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>tok</parameter></term>
<listitem>
<para>
Token name.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343151 $ -->
<refentry xml:id="parle-rparser.push" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::push</refname>
<refpurpose>Add a grammar rule</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>Parle\RParser::push</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>string</type><parameter>rule</parameter></methodparam>
</methodsynopsis>
<para>
Push a grammar rule. The production id returned can be used later in the parsing process to identify the rule matched.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
Rule name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>rule</parameter></term>
<listitem>
<para>
The rule to be added. The syntax is Bison compatible.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &integer; representing the rule index.
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343087 $ -->
<refentry xml:id="parle-rparser.right" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::right</refname>
<refpurpose>Declare a token with right-associativity</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::right</methodname>
<methodparam><type>string</type><parameter>tok</parameter></methodparam>
</methodsynopsis>
<para>
Declare a terminal with right associativity.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>tok</parameter></term>
<listitem>
<para>
Token name.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.sigil" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::sigil</refname>
<refpurpose>Retrieve a matching part of a rule</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>string</type><methodname>Parle\RParser::sigil</methodname>
<methodparam choice="opt"><type>integer</type><parameter>idx</parameter></methodparam>
</methodsynopsis>
<para>
Retrieve a part of the match by a rule. This method is equivalent to the pseudo variable functionality in Bison.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>idx</parameter></term>
<listitem>
<para>
Match index, zero based.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a &string; with the matched part.
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343087 $ -->
<refentry xml:id="parle-rparser.token" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::token</refname>
<refpurpose>Declare a token</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Parle\RParser::token</methodname>
<methodparam><type>string</type><parameter>tok</parameter></methodparam>
</methodsynopsis>
<para>
Declare a terminal to be used in the grammar.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>tok</parameter></term>
<listitem>
<para>
Token name.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.tokenid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::tokenId</refname>
<refpurpose>Get token id</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>Parle\RParser::tokenId</methodname>
<methodparam><type>string</type><parameter>tok</parameter></methodparam>
</methodsynopsis>
<para>
Retrieve the id of the named token.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>tok</parameter></term>
<listitem>
<para>
Name of the token as used in <methodname>Parle\RParser::token</methodname>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &integer; representing the token id.
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.trace" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::trace</refname>
<refpurpose>Trace the parser operation</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>string</type><methodname>Parle\RParser::trace</methodname>
<void />
</methodsynopsis>
<para>
Retrieve the current parser operation description. This can be especially useful to study the parser and to optimize the grammar.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a &string; with the trace information.
</para>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 343033 $ -->
<refentry xml:id="parle-rparser.validate" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Parle\RParser::validate</refname>
<refpurpose>Validate input</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Parle\RParser::validate</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>mixed</type><parameter>lexer</parameter></methodparam>
</methodsynopsis>
<para>
Validate an input string. The string is parsed internally, thus this method is useful for the quick input validation.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
String to be validated.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lexer</parameter></term>
<listitem>
<para>
A lexer object containing the lexing rules prepared for the particular grammar.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &boolean; whitnessing whether the input chimes or not with the defined rules.
</para>
</refsect1>
</refentry>
<!-- 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
-->