PMLTQ
view release on metacpan or search on metacpan
doc/pmltq_doc.xml view on Meta::CPAN
<phrase>(Un)Expand</phrase>
</textobject>
</inlinemediaobject> </guibutton> to expand the constraints to
auxiliary nodes in the query tree. The result will look like
this:</para>
<mediaobject>
<imageobject role="html">
<imagedata align="center" fileref="tutorial_queries_1.png"
format="PNG" />
</imageobject>
</mediaobject>
</listitem>
<listitem>
<para>Select the auxiliary node representing the constraint
<literal>functor="DPHR"</literal> and press <keysym>o</keysym> or
<guibutton> <inlinemediaobject>
<imageobject role="html">
<imagedata contentdepth="10pt" fileref="pmltq_icons/or.png"
format="PNG" />
</imageobject>
<textobject>
<phrase>OR</phrase>
</textobject>
</inlinemediaobject> </guibutton> to create an auxiliary
<literal>OR</literal> node above it.</para>
</listitem>
<listitem>
<para>Select the <literal>OR</literal> node and press
<keysym>=</keysym> or <guibutton> <inlinemediaobject>
<imageobject role="html">
<imagedata contentdepth="10pt"
fileref="pmltq_icons/test_equality.png"
format="PNG" />
</imageobject>
<textobject>
<phrase>Equality</phrase>
</textobject>
</inlinemediaobject> </guibutton> to create a new equality
constraint and as above, fill <literal>functor</literal> as
<literal>a</literal> and <literal>"CPHR"</literal> as
<literal>b</literal> in the form. Alternatively, you can select
the node <literal>functor="DPHR"</literal>, press <keycombo
action="simul">
<keysym>Ctrl</keysym>
<keysym>Insert</keysym>
</keycombo> or <guibutton> <inlinemediaobject>
<imageobject role="html">
<imagedata contentdepth="10pt" fileref="icons/editcopy.png"
format="PNG" />
</imageobject>
<textobject>
<phrase>Copy</phrase>
</textobject>
</inlinemediaobject> </guibutton> to copy it into the clipboard,
then select the <literal>OR</literal> node and press <keycombo
action="simul">
<keysym>Shift</keysym>
<keysym>Insert</keysym>
</keycombo> or <guibutton> <inlinemediaobject>
<imageobject role="html">
<imagedata contentdepth="10pt" fileref="icons/editpaste.png"
format="PNG" />
</imageobject>
<textobject>
<phrase>Paste</phrase>
</textobject>
</inlinemediaobject> </guibutton> to paste it. Then press
<keysym>Enter</keysym> or double-click the node or just the word
<literal>"DPHR"</literal> on one of the two nodes and change
<literal>"DPHR"</literal> to <literal>"CPHR"</literal>.</para>
</listitem>
<listitem>
<para>The result will look like this: <mediaobject>
<imageobject role="html">
<imagedata align="center" fileref="tutorial_queries_2b.png"
format="PNG" />
</imageobject>
<imageobject role="fo">
<imagedata align="center" fileref="tutorial_queries_2b.pdf"
format="PDF" />
</imageobject>
</mediaobject> Selecting the top t-node and pressing
<keysym>h</keysym> or <guibutton> <inlinemediaobject>
<imageobject role="html">
<imagedata contentdepth="10pt"
fileref="pmltq_icons/toggle_hide_subtree.png"
format="PNG" />
</imageobject>
<textobject>
<phrase>(Un)Expand</phrase>
</textobject>
</inlinemediaobject> </guibutton> hides the auxiliary nodes, and
gives this: <mediaobject>
<imageobject role="html">
<imagedata align="center" fileref="tutorial_queries_2c.png"
format="PNG" />
</imageobject>
</mediaobject></para>
</listitem>
</orderedlist></para>
<para>Using a regular expression: <programlisting>t-node [ functor ~ '[CD]PHR', t-node [ ] ]</programlisting>
Symbol <literal>~</literal> (tilde) denotes a binary relation between
two values that is true if and only if the value on the left interpreted
as string matches the value on the right interpreted as regular
expression. The regular expression <literal>[CD]PHR</literal> is matched
by any string containing either <literal>CPHR</literal> or
<literal>DPHR</literal> as a substring. If, for example,
<literal>XDPHR</literal> were a possible functor value, we would have to
( run in 0.637 second using v1.01-cache-2.11-cpan-84e82930d8c )