Skip to content

Commit

Permalink
A little more progress on invocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
katef committed Aug 17, 2024
1 parent a925708 commit c26c5fd
Showing 1 changed file with 20 additions and 29 deletions.
49 changes: 20 additions & 29 deletions man/re.1/re.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
<!ENTITY x.opt "<option>-x</option>">

<!ENTITY h.opt "<option>-h</option>">
<!ENTITY v.opt "<option>-v</option>">
]>

<refentry>
Expand Down Expand Up @@ -174,9 +173,6 @@ query

<group choice="req">
<arg choice="plain">&h.opt;</arg>
<!-- TODO: does re(1) have -v?
<arg choice="plain">&v.opt;</arg>
-->
</group>
</cmdsynopsis>
</refsynopsisdiv>
Expand All @@ -189,6 +185,8 @@ query
which are &ldquo;executed&rdquo; to match against input strings,
or used to provide example strings which would match when given as input.</para>

<para>This tool provides an interface to the &re.3; &api;.</para>

<para>The &re.1; tool constructs a Finite State Machine
from Regular Expression syntax.
<!--
Expand All @@ -199,34 +197,38 @@ query
and minimised to its canonical &dfa; by default.
The &nfa; may be preserved by the &n.opt; option.</para>

<para>multiple regexps may be given; these are unioned by default,
<para>Multiple regexps may be given; these are unioned by default,
or concatenated when the &s.opt; option is given.</para>

<para>&re.1; is invoked in one of four modes of operation:
<para>&re.1; is invoked in one of several distinct modes:
&p.opt; to print the constructed &fsm;,
&q.opt; to query each pattern's &fsm;,
&m.opt; to print example strings,
&G.opt; to print example matching inputs,
and the default is to execute regular expressions.
These modes are mutually exclusive.</para>
<!--
-i for files rather than patterns
regexp dialect specified by &r.opt;
-->

<para>
XXX: when executing,
strings are single or multiple with --.
can't we feed a string to stdin, too?
XXX: now with -x instead: Unlike &grep.1;, strings are matched from
command line arguments rather than &stdin.lit;.
TODO: with no strings to match, will just validate fsm instead.
validate is the wrong word
</para>

<para>When executing, text to match is given either as strings
from command line arguments, or is given as filenames with &x.opt;.
Multiple arguments may be given using <literal>--</literal>.
Unlike &grep.1;, &re.1; does not read text from &stdin.lit;.
<!-- TODO: why not?
can't we feed a string to stdin, too?
maybe better after moving execution to fsm(1) only -->
With no text to match, &re.1; will just validate
<!-- validate is the wrong word -->
the pattern syntax instead.</para>

<!-- TODO: groups don't exist as a UI feature yet,
not sure what to say here that doesn't belong to the libre api instead
<para>XXX: Groups
group (for dialects which have them) (rather than a "whole" regexp)
</para>

<para>This tool provides an interface to the &re.3; &api;.</para>
-->
</refsection>

<refsection>
Expand Down Expand Up @@ -536,17 +538,6 @@ group (for dialects which have them) (rather than a "whole" regexp)
</listitem>
</varlistentry>

<!-- TODO:
<varlistentry>
<term>&v.opt;</term>
<listitem>
<para>Causes &re.1; to print its version number.</para>
</listitem>
</varlistentry>
-->

<varlistentry>
<term>&h.opt;</term>

Expand Down

0 comments on commit c26c5fd

Please sign in to comment.