]> granicus.if.org Git - re2c/log
re2c
5 years agolibre2c_posix: small performance improvement in NFA-based matcher.
Ulya Trofimovich [Sat, 2 Feb 2019 19:08:45 +0000 (19:08 +0000)]
libre2c_posix: small performance improvement in NFA-based matcher.

5 years agolibre2c_posix: added NFA-based matcher.
Ulya Trofimovich [Sat, 2 Feb 2019 18:16:32 +0000 (18:16 +0000)]
libre2c_posix: added NFA-based matcher.

5 years agoConstified function parameter.
Ulya Trofimovich [Sat, 2 Feb 2019 18:12:18 +0000 (18:12 +0000)]
Constified function parameter.

5 years agolibre2c_posix: another small improvement in regexec() implementation.
Ulya Trofimovich [Sun, 27 Jan 2019 22:57:25 +0000 (22:57 +0000)]
libre2c_posix: another small improvement in regexec() implementation.

5 years agolibre2c_posix: a small performance improvement in regexec() implementation.
Ulya Trofimovich [Sun, 27 Jan 2019 18:05:23 +0000 (18:05 +0000)]
libre2c_posix: a small performance improvement in regexec() implementation.

5 years agolibre2c_posix: regex_t definition must be exposed to users.
Ulya Trofimovich [Sun, 27 Jan 2019 17:45:37 +0000 (17:45 +0000)]
libre2c_posix: regex_t definition must be exposed to users.

POSIX standard says that:

    The regex_t structure is defined in <regex.h> and contains at
    least the following member: re_nsub (number of parenthesized
    subexpressions).

5 years agolibre2c_posix: enable tag optimizations.
Ulya Trofimovich [Sun, 27 Jan 2019 11:35:18 +0000 (11:35 +0000)]
libre2c_posix: enable tag optimizations.

5 years agolibre2c_posix: extended regex_t structure to hold more submatch data.
Ulya Trofimovich [Sun, 27 Jan 2019 10:23:23 +0000 (10:23 +0000)]
libre2c_posix: extended regex_t structure to hold more submatch data.

Added fields:
    - re_nsub: total number of submatch groups, required by POSIX standard

    - pmatch: buffer for submatch results, usually supplied by the user to
      regexec(), but we allow to do the allocation and storage in regex_t.
      This is convenient for users that have hard time managing memory, e.g.
      java bindings to libre2c_posix.

    - regs: buffer for internal use by regexec(), strored in regex_t to
      avoid repeated memory allocation on each call to regexec() with the
      same regex.

5 years agoAdjusted build system to correctly build DLLs for windows.
Ulya Trofimovich [Sun, 27 Jan 2019 10:06:22 +0000 (10:06 +0000)]
Adjusted build system to correctly build DLLs for windows.

Adjustments:
    - configure.ac:  pass win32-dll option to LT_INIT

    - Makefile_libre2c_posix.am: use -no-undefined in LDFLAGS

    - use slibtool: https://github.com/midipix-project/slibtool for windows
      builds The problem with libtool is that it doesn't allow to link libstdc++
      and libgcc statically, which is necessary to build portable DLLs with
      Mingw. Libtool adds -nostdlib option to LDFLAGS and links some predefined
      objects that pull in dependency on dynamic libstdc++ and libgcc, even in
      the presence of -static-libstdc++ -static-libgcc.

5 years agoUse libtool to build libraries.
Ulya Trofimovich [Sat, 19 Jan 2019 11:57:16 +0000 (11:57 +0000)]
Use libtool to build libraries.

5 years agoFixed operator precedence with --flex-syntax option.
Ulya Trofimovich [Thu, 17 Jan 2019 22:52:04 +0000 (22:52 +0000)]
Fixed operator precedence with --flex-syntax option.

Operator precedence was broken because re2c tried to parse whole strings
of characters at once instead of parsing one character at a time (in
much the same way as it would parse properly quotes string literals in
the original re2c format). This caused ab* being parsed as (ab)*, which
is clearly wrong (should be a(b)*).

This fixes bug #242:
    "Operator precedence with --flex-syntax is broken."

5 years agolibre2c_posix: handle empty group () in parser; added more tests.
Ulya Trofimovich [Wed, 16 Jan 2019 21:49:38 +0000 (21:49 +0000)]
libre2c_posix: handle empty group () in parser; added more tests.

5 years agoMake re2c:eof usable with push-model lexers (-f, --storable-state option).
Ulya Trofimovich [Tue, 15 Jan 2019 23:45:53 +0000 (23:45 +0000)]
Make re2c:eof usable with push-model lexers (-f, --storable-state option).

5 years agolibre2c_posix: parse repetition counters in the lexer.
Ulya Trofimovich [Tue, 15 Jan 2019 00:24:22 +0000 (00:24 +0000)]
libre2c_posix: parse repetition counters in the lexer.

5 years agolibre2c_posix: initial support for character classes in parser.
Ulya Trofimovich [Mon, 14 Jan 2019 23:04:23 +0000 (23:04 +0000)]
libre2c_posix: initial support for character classes in parser.

5 years agolibre2c_posix (test): clear error status on expected failures.
Ulya Trofimovich [Sun, 13 Jan 2019 11:11:45 +0000 (11:11 +0000)]
libre2c_posix (test): clear error status on expected failures.

5 years agolibre2c_posix: skip fictive tags in regexec(); handle dot in parser; added more tests.
Ulya Trofimovich [Sun, 13 Jan 2019 10:57:53 +0000 (10:57 +0000)]
libre2c_posix: skip fictive tags in regexec(); handle dot in parser; added more tests.

5 years agolibre2c_posix: use C-array initializers instead of variadic functions for offset...
Ulya Trofimovich [Sat, 12 Jan 2019 20:32:15 +0000 (20:32 +0000)]
libre2c_posix: use C-array initializers instead of variadic functions for offset lists.

Variadic functions cause subtle toolchain-specific errors because integer
literals used to initialize offsets may have different type than the type
expected by variadic function (e.g. int vs long).

5 years agolibre2c_posix (test): a more concise error message.
Ulya Trofimovich [Sat, 12 Jan 2019 14:42:24 +0000 (14:42 +0000)]
libre2c_posix (test): a more concise error message.

5 years agolibre2c_posix: fixed -Wmaybe-uninitialized GCC warning.
Ulya Trofimovich [Sat, 12 Jan 2019 14:19:21 +0000 (14:19 +0000)]
libre2c_posix: fixed -Wmaybe-uninitialized GCC warning.

5 years agolibre2c_posix: fixed memleaks.
Ulya Trofimovich [Sat, 12 Jan 2019 14:18:21 +0000 (14:18 +0000)]
libre2c_posix: fixed memleaks.

5 years agoExperimental: initial implementation of libre2c_posix, POSIX regexp library based...
Ulya Trofimovich [Sat, 12 Jan 2019 12:50:47 +0000 (12:50 +0000)]
Experimental: initial implementation of libre2c_posix, POSIX regexp library based on re2c.

5 years agoPaper: don't forget to pass precedence matrices to initial closure.
Ulya Trofimovich [Fri, 11 Jan 2019 08:16:00 +0000 (08:16 +0000)]
Paper: don't forget to pass precedence matrices to initial closure.

5 years agoMakefile.am: further simplify parser generation rules and avoid copying file to itself.
Ulya Trofimovich [Fri, 11 Jan 2019 00:34:07 +0000 (00:34 +0000)]
Makefile.am: further simplify parser generation rules and avoid copying file to itself.

5 years agoMakefile.am: don't forget to run main test suite on `make check`.
Ulya Trofimovich [Fri, 11 Jan 2019 00:19:01 +0000 (00:19 +0000)]
Makefile.am: don't forget to run main test suite on `make check`.

5 years agoMakefile.am: use more universal rules for autogenerated lexers and parsers.
Ulya Trofimovich [Thu, 10 Jan 2019 23:28:30 +0000 (23:28 +0000)]
Makefile.am: use more universal rules for autogenerated lexers and parsers.

5 years agoAvoid unexpected removal of untracked files and directories.
Ulya Trofimovich [Thu, 10 Jan 2019 22:16:07 +0000 (22:16 +0000)]
Avoid unexpected removal of untracked files and directories.

5 years agoMoved function declarations to the header they belong in.
Ulya Trofimovich [Thu, 10 Jan 2019 22:09:25 +0000 (22:09 +0000)]
Moved function declarations to the header they belong in.

5 years agoUpdated range test.
Ulya Trofimovich [Sun, 6 Jan 2019 16:44:45 +0000 (16:44 +0000)]
Updated range test.

5 years agoUse a simple fixed-size slab allocator for ranges.
Ulya Trofimovich [Sun, 6 Jan 2019 16:25:39 +0000 (16:25 +0000)]
Use a simple fixed-size slab allocator for ranges.

5 years agoHandle single chars and 1-char ranges in the same way.
Ulya Trofimovich [Sun, 6 Jan 2019 08:40:16 +0000 (08:40 +0000)]
Handle single chars and 1-char ranges in the same way.

5 years agoUpdated autogenerated files after change of directory layout.
Ulya Trofimovich [Sat, 5 Jan 2019 22:53:45 +0000 (22:53 +0000)]
Updated autogenerated files after change of directory layout.

5 years agoMoved duplicated code into a separate function.
Ulya Trofimovich [Sat, 5 Jan 2019 22:49:52 +0000 (22:49 +0000)]
Moved duplicated code into a separate function.

5 years agoChanged directory layout (cosmetic).
Ulya Trofimovich [Sat, 5 Jan 2019 22:41:45 +0000 (22:41 +0000)]
Changed directory layout (cosmetic).

5 years agoHandle EBCDIC like other encodings instead of coupling it with character validation.
Ulya Trofimovich [Sat, 5 Jan 2019 13:16:36 +0000 (13:16 +0000)]
Handle EBCDIC like other encodings instead of coupling it with character validation.

5 years agoMoved repeated code into a separate function.
Ulya Trofimovich [Sat, 5 Jan 2019 11:42:29 +0000 (11:42 +0000)]
Moved repeated code into a separate function.

5 years agoFixed error in range difference with EBCDIC, added tests for various encodings.
Ulya Trofimovich [Fri, 4 Jan 2019 20:59:25 +0000 (20:59 +0000)]
Fixed error in range difference with EBCDIC, added tests for various encodings.

5 years agoCompute range difference before applying encoding expansion to operands.
Ulya Trofimovich [Fri, 4 Jan 2019 10:53:22 +0000 (10:53 +0000)]
Compute range difference before applying encoding expansion to operands.

5 years agoAdded test for bug #238.
Ulya Trofimovich [Fri, 4 Jan 2019 19:27:58 +0000 (19:27 +0000)]
Added test for bug #238.

5 years agoFixed out-of-bounds write caused by misuse of slab allocator in case of large allocat...
Ulya Trofimovich [Fri, 4 Jan 2019 12:54:03 +0000 (12:54 +0000)]
Fixed out-of-bounds write caused by misuse of slab allocator in case of large allocation size.

This fixes bug #238.
Found by american fuzzy lop (thanks to Henri Salo).

5 years agoAdjusting formatting, dropping old macros (cosmetic).
Ulya Trofimovich [Thu, 3 Jan 2019 22:56:34 +0000 (22:56 +0000)]
Adjusting formatting, dropping old macros (cosmetic).

5 years agoAdded tests for debug options.
Ulya Trofimovich [Thu, 3 Jan 2019 22:37:54 +0000 (22:37 +0000)]
Added tests for debug options.

5 years agoAdded debug options --dump-cfg and --dump-interf.
Ulya Trofimovich [Thu, 3 Jan 2019 21:58:53 +0000 (21:58 +0000)]
Added debug options --dump-cfg and --dump-interf.

5 years agoMoved debug stuff to a separate subdirectory.
Ulya Trofimovich [Thu, 3 Jan 2019 21:17:22 +0000 (21:17 +0000)]
Moved debug stuff to a separate subdirectory.

5 years agoDisable --dump-* options in non-debug mode.
Ulya Trofimovich [Thu, 3 Jan 2019 20:26:36 +0000 (20:26 +0000)]
Disable --dump-* options in non-debug mode.

5 years agoAdding --enable-debug to Travis CI configuration.
Ulya Trofimovich [Thu, 3 Jan 2019 11:33:04 +0000 (11:33 +0000)]
Adding --enable-debug to Travis CI configuration.

5 years agoAdded some tests for GTOP closure algorithm.
Ulya Trofimovich [Thu, 3 Jan 2019 11:26:51 +0000 (11:26 +0000)]
Added some tests for GTOP closure algorithm.

5 years agoAdded test comparing POSIX closure statistics with GOR1 and GTOP.
Ulya Trofimovich [Thu, 3 Jan 2019 11:13:15 +0000 (11:13 +0000)]
Added test comparing POSIX closure statistics with GOR1 and GTOP.

5 years agoIn debug build, add " (debug)" to version string.
Ulya Trofimovich [Thu, 3 Jan 2019 10:44:24 +0000 (10:44 +0000)]
In debug build, add " (debug)" to version string.

5 years agoSmall simplifications in GOR1 initialization phase.
Ulya Trofimovich [Thu, 3 Jan 2019 09:53:57 +0000 (09:53 +0000)]
Small simplifications in GOR1 initialization phase.

Instead of using two stacks to weed out low-precedence initial
configurations with duplicate target state, let them remain on the
bottom of topsort stack, which effectively makes them ignored.

5 years agoPaper: simplifying GOR1 initialization pseudocode.
Ulya Trofimovich [Wed, 2 Jan 2019 22:57:51 +0000 (22:57 +0000)]
Paper: simplifying GOR1 initialization pseudocode.

5 years agoSmall cosmetic simplifications in POSIX precedence.
Ulya Trofimovich [Wed, 2 Jan 2019 17:54:11 +0000 (17:54 +0000)]
Small cosmetic simplifications in POSIX precedence.

5 years agoUse a specialized simplified version of POSIX comparison for initial configurations.
Ulya Trofimovich [Wed, 2 Jan 2019 17:43:17 +0000 (17:43 +0000)]
Use a specialized simplified version of POSIX comparison for initial configurations.

5 years agoIntrinsic options that do not have configurations should be immutable.
Ulya Trofimovich [Tue, 1 Jan 2019 13:24:10 +0000 (13:24 +0000)]
Intrinsic options that do not have configurations should be immutable.

5 years agoAdded debug option --dump-closure-stats.
Ulya Trofimovich [Tue, 1 Jan 2019 13:13:14 +0000 (13:13 +0000)]
Added debug option --dump-closure-stats.

5 years agoAdjust TNFA construction for bounded repetition to the needs of GOR1.
Ulya Trofimovich [Mon, 31 Dec 2018 20:55:01 +0000 (20:55 +0000)]
Adjust TNFA construction for bounded repetition to the needs of GOR1.

5 years agoOrder initial configurations by POSIX precedence in GOR1.
Ulya Trofimovich [Mon, 31 Dec 2018 12:52:43 +0000 (12:52 +0000)]
Order initial configurations by POSIX precedence in GOR1.

5 years agoAdded option --posix-closure <gor1|gtop>. Removed configurations for internal options.
Ulya Trofimovich [Mon, 31 Dec 2018 12:37:12 +0000 (12:37 +0000)]
Added option --posix-closure <gor1|gtop>. Removed configurations for internal options.

5 years agoAdded GTOP SSSP algorithm for computing epsilon-closure with POSIX disambiguation.
Ulya Trofimovich [Mon, 31 Dec 2018 12:08:42 +0000 (12:08 +0000)]
Added GTOP SSSP algorithm for computing epsilon-closure with POSIX disambiguation.

GTOP SSSP meand "Global Topsort Single Source Shortes Path".

It is well known that SSSP can be solved in linear time on DAGs (directed
acyclic graphs) by exploring graph nodes in topological order. In our case
TNFA is not a DAG (it may have cycles), but it is possible to compute fake
topologcal order by ignoring back edges.

The algorithm works by having a priority queue of nodes, where priorities
are indices of nodes in fake topological ordering. At each step, the node
with the minimal priority is popped from queue and explored. All nodes
reachable from it on admissible arcs are enqueued, unless they are already
on queue.

The resulting algorithm is of course not optimal: it can get stuck on
graphs with loops, because it will give priority to some of the loop nodes
compared to others for no good reason.

However the algorithm is simple and optimal for DAGs, therefore we keep it.

5 years agorun_tests.sh: cleanup .inc files.
Ulya Trofimovich [Mon, 31 Dec 2018 10:57:47 +0000 (10:57 +0000)]
run_tests.sh: cleanup .inc files.

5 years agoConverting tabs to spaces (cosmetic).
Ulya Trofimovich [Sun, 30 Dec 2018 23:35:29 +0000 (23:35 +0000)]
Converting tabs to spaces (cosmetic).

5 years agoEh, some of the asserts were doing useful work and affecting control flow.
Ulya Trofimovich [Sun, 30 Dec 2018 23:30:28 +0000 (23:30 +0000)]
Eh, some of the asserts were doing useful work and affecting control flow.

5 years agoAdded assert wrapper that is turned on/off with --enable-debug configure option.
Ulya Trofimovich [Sun, 30 Dec 2018 19:53:46 +0000 (19:53 +0000)]
Added assert wrapper that is turned on/off with --enable-debug configure option.

5 years agoFixed errors in packing of signed integers.
Ulya Trofimovich [Sun, 30 Dec 2018 17:21:39 +0000 (17:21 +0000)]
Fixed errors in packing of signed integers.

5 years agoReduce boilerplate in option parser with a few macros.
Ulya Trofimovich [Sun, 30 Dec 2018 11:42:38 +0000 (11:42 +0000)]
Reduce boilerplate in option parser with a few macros.

5 years agoUse a couple of helper functions to make string construction easier.
Ulya Trofimovich [Sun, 30 Dec 2018 10:59:28 +0000 (10:59 +0000)]
Use a couple of helper functions to make string construction easier.

5 years agoCorrectly parse -I option with or without space before the argument.
Ulya Trofimovich [Sun, 30 Dec 2018 10:30:19 +0000 (10:30 +0000)]
Correctly parse -I option with or without space before the argument.

5 years agorun_tests.sh: use paths relative to build directory, not to source directory.
Ulya Trofimovich [Sat, 29 Dec 2018 21:40:08 +0000 (21:40 +0000)]
run_tests.sh: use paths relative to build directory, not to source directory.

Otherwise test results aren't reproducible: they depend on the
location of build directory relative to source directory.

5 years agoAdding forgotten files to git.
Ulya Trofimovich [Sat, 29 Dec 2018 14:24:32 +0000 (14:24 +0000)]
Adding forgotten files to git.

5 years agoMore tests for include directive.
Ulya Trofimovich [Sat, 29 Dec 2018 14:17:31 +0000 (14:17 +0000)]
More tests for include directive.

5 years agoResolve names of included files relative to including file, not to the main file.
Ulya Trofimovich [Sat, 29 Dec 2018 00:16:53 +0000 (00:16 +0000)]
Resolve names of included files relative to including file, not to the main file.

5 years agoUse correct order when unreading files from lexer buffer.
Ulya Trofimovich [Sat, 29 Dec 2018 00:06:28 +0000 (00:06 +0000)]
Use correct order when unreading files from lexer buffer.

In lexer buffer nested files come before outer files. In lexer file
stack, however, outer files go before nested files (nested are at the
top). We want to break from the unreading cycle early, therefore we
proceed in reverse order of file offsets in buffer and break as soon
as the end offset is less than cursor (current position).

5 years agoSimplified lexing of include directive.
Ulya Trofimovich [Thu, 27 Dec 2018 22:49:25 +0000 (22:49 +0000)]
Simplified lexing of include directive.

5 years agoTweaking a couple of labels in lexer to simplify updating of token pointer.
Ulya Trofimovich [Thu, 27 Dec 2018 22:38:59 +0000 (22:38 +0000)]
Tweaking a couple of labels in lexer to simplify updating of token pointer.

5 years agoRemoved unused struct field.
Ulya Trofimovich [Thu, 27 Dec 2018 22:17:52 +0000 (22:17 +0000)]
Removed unused struct field.

5 years agoAdded test for EOF rule.
Ulya Trofimovich [Thu, 27 Dec 2018 22:10:49 +0000 (22:10 +0000)]
Added test for EOF rule.

5 years agoTrack current line of each input file separately.
Ulya Trofimovich [Thu, 27 Dec 2018 22:08:38 +0000 (22:08 +0000)]
Track current line of each input file separately.

5 years agoCorrectly handle current directory '.' in include paths.
Ulya Trofimovich [Wed, 26 Dec 2018 20:12:51 +0000 (20:12 +0000)]
Correctly handle current directory '.' in include paths.

6 years agoAdded -I option (paths to include directories).
Ulya Trofimovich [Wed, 26 Dec 2018 11:37:30 +0000 (11:37 +0000)]
Added -I option (paths to include directories).

6 years agoAdded /*!include:re2c ... */ directive.
Ulya Trofimovich [Tue, 25 Dec 2018 19:53:23 +0000 (19:53 +0000)]
Added /*!include:re2c ... */ directive.

6 years agoPreparations to support #include: keep input files in a stack.
Ulya Trofimovich [Sun, 23 Dec 2018 19:32:29 +0000 (19:32 +0000)]
Preparations to support #include: keep input files in a stack.

6 years agoconfigure.ac: set -Wreturn-type to error.
Ulya Trofimovich [Sun, 23 Dec 2018 19:16:02 +0000 (19:16 +0000)]
configure.ac: set -Wreturn-type to error.

6 years agoInitial support of EOF rule.
Ulya Trofimovich [Sat, 22 Dec 2018 23:34:41 +0000 (23:34 +0000)]
Initial support of EOF rule.

6 years agoUpdated unicode tests and test generators for newer versions of unicode.
Ulya Trofimovich [Sat, 22 Dec 2018 11:48:12 +0000 (11:48 +0000)]
Updated unicode tests and test generators for newer versions of unicode.

6 years agoPaper: added two output() functions that convert t-string to parse tree and offsets.
Ulya Trofimovich [Thu, 20 Dec 2018 00:06:42 +0000 (00:06 +0000)]
Paper: added two output() functions that convert t-string to parse tree and offsets.

6 years agoPaper: tweaked TNFA construction.
Ulya Trofimovich [Tue, 18 Dec 2018 23:56:04 +0000 (23:56 +0000)]
Paper: tweaked TNFA construction.

6 years agoLexer: use YYMAXFILL padding and don't forget to shift tag variables in YYFILL.
Ulya Trofimovich [Thu, 6 Dec 2018 22:03:34 +0000 (22:03 +0000)]
Lexer: use YYMAXFILL padding and don't forget to shift tag variables in YYFILL.

This fixes bug #232, #233 and #234.
Found by american fuzzy lop (thanks to Henri Salo).

6 years agoCorrectly identify mapped TDFA state with --dump-dfa-raw option.
Ulya Trofimovich [Thu, 6 Dec 2018 22:01:25 +0000 (22:01 +0000)]
Correctly identify mapped TDFA state with --dump-dfa-raw option.

6 years agoMakefile.am: enable RE2C warnings (-W option).
Ulya Trofimovich [Thu, 29 Nov 2018 22:21:43 +0000 (22:21 +0000)]
Makefile.am: enable RE2C warnings (-W option).

6 years agoFixed read past the end of buffer in configuration parser.
Ulya Trofimovich [Thu, 29 Nov 2018 22:15:18 +0000 (22:15 +0000)]
Fixed read past the end of buffer in configuration parser.

This fixes bug #231.
Found by american fuzzy lop (thanks to Henri Salo).
Also reported by re2c -W (shame on me for not using it all this time!).

6 years agoPaper: tweaking TNFA construction.
Ulya Trofimovich [Mon, 26 Nov 2018 22:58:14 +0000 (22:58 +0000)]
Paper: tweaking TNFA construction.

6 years agoMakefile.am: build autogenerates files before other targets (they may create headers).
Ulya Trofimovich [Thu, 22 Nov 2018 01:00:57 +0000 (01:00 +0000)]
Makefile.am: build autogenerates files before other targets (they may create headers).

Note: I used $(@:cc=*) construct as bmake doesn't understand $*.* .

6 years agoUse tags to lex condition goto.
Ulya Trofimovich [Wed, 21 Nov 2018 22:03:12 +0000 (22:03 +0000)]
Use tags to lex condition goto.

6 years agoStarted using tags in re2c own lexer.
Ulya Trofimovich [Wed, 21 Nov 2018 00:15:15 +0000 (00:15 +0000)]
Started using tags in re2c own lexer.

6 years agoRemoved redundant wrapper around output file struct.
Ulya Trofimovich [Mon, 19 Nov 2018 23:38:07 +0000 (23:38 +0000)]
Removed redundant wrapper around output file struct.

6 years agoDump header on stdout if filename is not set, but /*!header:re2c:on*/ is used.
Ulya Trofimovich [Mon, 19 Nov 2018 23:22:33 +0000 (23:22 +0000)]
Dump header on stdout if filename is not set, but /*!header:re2c:on*/ is used.

6 years agoAdded configurations for -o, --output and -t, --type-header options.
Ulya Trofimovich [Fri, 16 Nov 2018 23:43:41 +0000 (23:43 +0000)]
Added configurations for -o, --output and -t, --type-header options.

6 years agoAdded missing #line info after /*!header:re2c: ... */ directive.
Ulya Trofimovich [Sun, 18 Nov 2018 12:19:27 +0000 (12:19 +0000)]
Added missing #line info after /*!header:re2c: ... */ directive.

Renamed:
    /*!header:re2c:1*/ -> /*!header:re2c:on*/
    /*!header:re2c:0*/ -> /*!header:re2c:off*/

6 years agoAdded /*!header:re2c:0*/ and /*!header:re2c:1*/ directives.
Ulya Trofimovich [Sun, 18 Nov 2018 10:50:00 +0000 (10:50 +0000)]
Added /*!header:re2c:0*/ and /*!header:re2c:1*/ directives.

Combined with -t, --type-header option, this allows to put arbitrary
parts of the generated output in a header file.

6 years agoTweaking condition list lexer.
Ulya Trofimovich [Fri, 16 Nov 2018 00:36:11 +0000 (00:36 +0000)]
Tweaking condition list lexer.