From f962589e25aef34e85bee331bc89133b6c280328 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Wed, 9 Aug 2017 18:35:15 +0100 Subject: [PATCH] Updated options list and regenerated docs. --- re2c/Makefile.am | 2 +- re2c/bootstrap/doc/re2c.1 | 39 +++++++++++++++++++++- re2c/bootstrap/src/conf/help.cc | 42 ++++++++++++++++++++++++ re2c/doc/manual/options/options_list.rst | 37 +++++++++++++++++++++ 4 files changed, 118 insertions(+), 2 deletions(-) diff --git a/re2c/Makefile.am b/re2c/Makefile.am index 83072396..3a5a0974 100644 --- a/re2c/Makefile.am +++ b/re2c/Makefile.am @@ -274,7 +274,7 @@ bootstrap: all .PHONY: docs if REBUILD_DOCS docs: $(DOC) $(AUTOGEN_HELP) -$(DOC): $(SRC_DOC) +$(DOC): $(SRC_DOC) $(SRC_DOC_EXT) $(AM_V_at)$(MKDIR_P) $(@D) $(RST2MAN) $(top_builddir)/$(SRC_DOC) > $@ cp $@ $(top_srcdir)/$(BOOTSTRAP_DOC) diff --git a/re2c/bootstrap/doc/re2c.1 b/re2c/bootstrap/doc/re2c.1 index 469d1ab3..f6167555 100644 --- a/re2c/bootstrap/doc/re2c.1 +++ b/re2c/bootstrap/doc/re2c.1 @@ -120,6 +120,14 @@ Create a \fBHEADER\fP file that contains types for the (f)lex\-like condition support. This can only be activated when \fB\-c\fP is in use. .TP +.B \fB\-T \-\-tags\fP +Enable submatch extraction with tags. +This option is implied by \fB\-\-posix\-captures\fP\&. +.TP +.B \fB\-P \-\-posix\-captures\fP +Enable submatch extraction with POSIX\-style capturing groups. +This option implies \fB\-T \-\-tags\fP\&. +.TP .B \fB\-u \-\-unicode\fP Generate a parser that supports UTF\-32. The generated code can deal with any valid Unicode character up to 0x10FFFF. In this @@ -163,6 +171,9 @@ quotes are case insensitive. .B \fB\-\-no\-generation\-date\fP Suppress date output in the generated file. .TP +.B \fB\-\-no\-optimize\-tags\fP +Suppress tag optimization (mostly used for debugging). +.TP .B \fB\-\-no\-version\fP Suppress version output in the generated file. .TP @@ -201,6 +212,32 @@ The internal algorithm used by re2c to minimize the DFA (defaults to \fBmoore\fP Both the table filling algorithm and the Moore algorithm should produce the same DFA (up to states relabeling). The table filling algorithm is much simpler and slower; it serves as a reference implementation. .TP +.B \fB\-\-eager\-skip\fP +This option controls when the generated lexer advances to the next input symbol +(that is, increments YYCURSOR or invokes YYSKIP). +By default this happens after transition to the next state, +but \fB\-\-eager\-skip\fP option allows to override default behavior +and advance input position immediately after reading input symbol. +This option is implied by \fB\-\-no\-lookahead\fP\&. +.TP +.B \fB\-\-dump\-nfa\fP +Generate .dot representation of NFA and dump it on stderr. +.TP +.B \fB\-\-dump\-dfa\-raw\fP +Generate .dot representation of DFA under construction and dump it on stderr. +.TP +.B \fB\-\-dump\-dfa\-det\fP +Generate .dot representation of DFA immediately after determinization and dump it on stderr. +.TP +.B \fB\-\-dump\-dfa\-tagopt\fP +Generate .dot representation of DFA after tag optimizations and dump it on stderr. +.TP +.B \fB\-\-dump\-dfa\-min\fP +Generate .dot representation of DFA after minimization and dump it on stderr. +.TP +.B \fB\-\-dump\-adfa\fP +Generate .dot representation of DFA after tunneling and dump it on stderr. +.TP .B \fB\-1 \-\-single\-pass\fP Deprecated. Does nothing (single pass is the default now). .UNINDENT @@ -1034,6 +1071,6 @@ Emmanuel Mogenet \fI\%mgix@mgix.com\fP Ulya Trofimovich \fI\%skvadrik@gmail.com\fP .SH VERSION INFORMATION .sp -This manpage describes \fBre2c\fP version 0.16, package date 20 Apr 2017. +This manpage describes \fBre2c\fP version 0.16, package date 09 Aug 2017. .\" Generated by docutils manpage writer. . diff --git a/re2c/bootstrap/src/conf/help.cc b/re2c/bootstrap/src/conf/help.cc index 10ac400c..cf18b859 100644 --- a/re2c/bootstrap/src/conf/help.cc +++ b/re2c/bootstrap/src/conf/help.cc @@ -80,6 +80,14 @@ const char *help = " Create a HEADER file that contains types for the (f)lex-like\n" " condition support. This can only be activated when -c is in use.\n" "\n" +" -T --tags\n" +" Enable submatch extraction with tags. This option is implied by\n" +" --posix-captures.\n" +"\n" +" -P --posix-captures\n" +" Enable submatch extraction with POSIX-style capturing groups.\n" +" This option implies -T --tags.\n" +"\n" " -u --unicode\n" " Generate a parser that supports UTF-32. The generated code can\n" " deal with any valid Unicode character up to 0x10FFFF. In this\n" @@ -123,6 +131,9 @@ const char *help = " --no-generation-date\n" " Suppress date output in the generated file.\n" "\n" +" --no-optimize-tags\n" +" Suppress tag optimization (mostly used for debugging).\n" +"\n" " --no-version\n" " Suppress version output in the generated file.\n" "\n" @@ -162,6 +173,37 @@ const char *help = " beling). The table filling algorithm is much simpler and\n" " slower; it serves as a reference implementation.\n" "\n" +" --eager-skip\n" +" This option controls when the generated lexer advances to the\n" +" next input symbol (that is, increments YYCURSOR or invokes\n" +" YYSKIP). By default this happens after transition to the next\n" +" state, but --eager-skip option allows to override default behav‐\n" +" ior and advance input position immediately after reading input\n" +" symbol. This option is implied by --no-lookahead.\n" +"\n" +" --dump-nfa\n" +" Generate .dot representation of NFA and dump it on stderr.\n" +"\n" +" --dump-dfa-raw\n" +" Generate .dot representation of DFA under construction and dump\n" +" it on stderr.\n" +"\n" +" --dump-dfa-det\n" +" Generate .dot representation of DFA immediately after deter‐\n" +" minization and dump it on stderr.\n" +"\n" +" --dump-dfa-tagopt\n" +" Generate .dot representation of DFA after tag optimizations and\n" +" dump it on stderr.\n" +"\n" +" --dump-dfa-min\n" +" Generate .dot representation of DFA after minimization and dump\n" +" it on stderr.\n" +"\n" +" --dump-adfa\n" +" Generate .dot representation of DFA after tunneling and dump it\n" +" on stderr.\n" +"\n" " -1 --single-pass\n" " Deprecated. Does nothing (single pass is the default now).\n" "\n" diff --git a/re2c/doc/manual/options/options_list.rst b/re2c/doc/manual/options/options_list.rst index 97443971..1bf3f722 100644 --- a/re2c/doc/manual/options/options_list.rst +++ b/re2c/doc/manual/options/options_list.rst @@ -76,6 +76,14 @@ contains types for the (f)lex-like condition support. This can only be activated when ``-c`` is in use. +``-T --tags`` + Enable submatch extraction with tags. + This option is implied by ``--posix-captures``. + +``-P --posix-captures`` + Enable submatch extraction with POSIX-style capturing groups. + This option implies ``-T --tags``. + ``-u --unicode`` Generate a parser that supports UTF-32. The generated code can deal with any valid Unicode character up to 0x10FFFF. In this @@ -119,6 +127,9 @@ ``--no-generation-date`` Suppress date output in the generated file. +``--no-optimize-tags`` + Suppress tag optimization (mostly used for debugging). + ``--no-version`` Suppress version output in the generated file. @@ -157,5 +168,31 @@ Both the table filling algorithm and the Moore algorithm should produce the same DFA (up to states relabeling). The table filling algorithm is much simpler and slower; it serves as a reference implementation. +``--eager-skip`` + This option controls when the generated lexer advances to the next input symbol + (that is, increments YYCURSOR or invokes YYSKIP). + By default this happens after transition to the next state, + but ``--eager-skip`` option allows to override default behavior + and advance input position immediately after reading input symbol. + This option is implied by ``--no-lookahead``. + +``--dump-nfa`` + Generate .dot representation of NFA and dump it on stderr. + +``--dump-dfa-raw`` + Generate .dot representation of DFA under construction and dump it on stderr. + +``--dump-dfa-det`` + Generate .dot representation of DFA immediately after determinization and dump it on stderr. + +``--dump-dfa-tagopt`` + Generate .dot representation of DFA after tag optimizations and dump it on stderr. + +``--dump-dfa-min`` + Generate .dot representation of DFA after minimization and dump it on stderr. + +``--dump-adfa`` + Generate .dot representation of DFA after tunneling and dump it on stderr. + ``-1 --single-pass`` Deprecated. Does nothing (single pass is the default now). -- 2.40.0