]> granicus.if.org Git - re2c/log
re2c
9 years agoMoved methods out of class.
Ulya Trofimovich [Wed, 11 Mar 2015 14:45:12 +0000 (14:45 +0000)]
Moved methods out of class.

9 years agoReduced useless wrappers.
Ulya Trofimovich [Wed, 11 Mar 2015 12:52:32 +0000 (12:52 +0000)]
Reduced useless wrappers.

9 years agoPass limited span instead of checking range all the time.
Ulya Trofimovich [Wed, 11 Mar 2015 12:46:58 +0000 (12:46 +0000)]
Pass limited span instead of checking range all the time.

9 years agoSimplify handling of high/low spans.
Ulya Trofimovich [Wed, 11 Mar 2015 10:52:05 +0000 (10:52 +0000)]
Simplify handling of high/low spans.

Spans are already ordered, so to get high (wide) spans,
all we need is to find first span with upper bound >0x100
and point at it.

9 years agoMoved wide span barrier to 0x100 rather than 0xFF.
Ulya Trofimovich [Tue, 10 Mar 2015 21:53:11 +0000 (21:53 +0000)]
Moved wide span barrier to 0x100 rather than 0xFF.

0x100 corresponds to condition 'encoding.szCodeUnit () <= 1',
cause field 'ub' in 'Span' means upper bound of char interval.

9 years agoRemoved useless statistics counter.
Ulya Trofimovich [Tue, 10 Mar 2015 21:33:13 +0000 (21:33 +0000)]
Removed useless statistics counter.

Verified with 'assert (dSpans >= lTargets);'

9 years agoReclaced class member with a local variable.
Ulya Trofimovich [Tue, 10 Mar 2015 18:53:31 +0000 (18:53 +0000)]
Reclaced class member with a local variable.

9 years agoReplaced class member with a local variable.
Ulya Trofimovich [Tue, 10 Mar 2015 18:47:31 +0000 (18:47 +0000)]
Replaced class member with a local variable.

9 years agoEliminated redundant variable.
Ulya Trofimovich [Tue, 10 Mar 2015 18:41:50 +0000 (18:41 +0000)]
Eliminated redundant variable.

9 years agoRemoved unused variable.
Ulya Trofimovich [Tue, 10 Mar 2015 17:07:10 +0000 (17:07 +0000)]
Removed unused variable.

9 years agoRemoved dead code.
Ulya Trofimovich [Tue, 10 Mar 2015 16:01:15 +0000 (16:01 +0000)]
Removed dead code.

9 years agoExtracted common functionality in codegen -g and -b flags.
Ulya Trofimovich [Tue, 10 Mar 2015 15:58:29 +0000 (15:58 +0000)]
Extracted common functionality in codegen -g and -b flags.

9 years agoRemoved obsolete condition (makes no sense in single-pass mode).
Ulya Trofimovich [Sat, 7 Mar 2015 20:54:08 +0000 (20:54 +0000)]
Removed obsolete condition (makes no sense in single-pass mode).

9 years agoSimplified .dot codegen:
Ulya Trofimovich [Sat, 7 Mar 2015 20:00:06 +0000 (20:00 +0000)]
Simplified .dot codegen:

- draw a single arrow for all transitions between two given states
- label all arrows with corresponding character ranges in square
  brackests (no "default" label, single characters also appear in
  square brackets)
- .dot output became much smaller, thus pictures are drawn faster
  and generally look better: e.g. it takes ~10x less time to draw
  PHP lexer and the resulting graph is shaped better.

9 years agoSimplified switch generetion in codegen.
Ulya Trofimovich [Thu, 5 Mar 2015 16:47:25 +0000 (16:47 +0000)]
Simplified switch generetion in codegen.

9 years agoContinued separating .dot case from other cases in codegen.
Ulya Trofimovich [Wed, 4 Mar 2015 17:26:40 +0000 (17:26 +0000)]
Continued separating .dot case from other cases in codegen.

9 years agoContinued separating .dot case from other cases in codegen.
Ulya Trofimovich [Wed, 4 Mar 2015 17:23:28 +0000 (17:23 +0000)]
Continued separating .dot case from other cases in codegen.

9 years agoContinued separating .dot case from other cases in codegen. Added test.
Ulya Trofimovich [Wed, 4 Mar 2015 17:15:38 +0000 (17:15 +0000)]
Continued separating .dot case from other cases in codegen. Added test.

9 years agoContinued separating .dot case from other cases in codegen.
Ulya Trofimovich [Wed, 4 Mar 2015 15:43:43 +0000 (15:43 +0000)]
Continued separating .dot case from other cases in codegen.

9 years agoContinued separating .dot case from other cases in codegen.
Ulya Trofimovich [Wed, 4 Mar 2015 15:41:10 +0000 (15:41 +0000)]
Continued separating .dot case from other cases in codegen.

9 years agoStarted to separate .dot case from other cases in codegen.
Ulya Trofimovich [Wed, 4 Mar 2015 15:16:34 +0000 (15:16 +0000)]
Started to separate .dot case from other cases in codegen.

9 years agoRemoved dead code.
Ulya Trofimovich [Wed, 4 Mar 2015 13:12:19 +0000 (13:12 +0000)]
Removed dead code.

Used 'if (next) assert(next->label == from->label + 1);'
to ensure that code is really dead (and 'next' is always
the next state to 'from').

9 years agoHided 'OutputFile' structure.
Ulya Trofimovich [Mon, 2 Mar 2015 13:54:11 +0000 (13:54 +0000)]
Hided 'OutputFile' structure.

9 years agoCode cleanup in input/output:
Ulya Trofimovich [Mon, 2 Mar 2015 12:41:53 +0000 (12:41 +0000)]
Code cleanup in input/output:

- Use 'open' function instead of checking return status
  (one may forget to check return status, but if one forgets to
  open file, the error will be obvious)
- Introduced separate file type for header.
  Header is much simpler than output, it doesn't need delayed
  code fragments and can be generated in destructor.

9 years agoFinally get rid of 'file_info' and 'stream_lc.h'
Ulya Trofimovich [Fri, 27 Feb 2015 23:42:01 +0000 (23:42 +0000)]
Finally get rid of 'file_info' and 'stream_lc.h'

9 years agoReduce 'file_info' usage (in order to get rid of 'stream_lc.h').
Ulya Trofimovich [Thu, 26 Feb 2015 13:23:02 +0000 (13:23 +0000)]
Reduce 'file_info' usage (in order to get rid of 'stream_lc.h').

9 years ago'token.h' no longer depends on 'file_info'.
Ulya Trofimovich [Thu, 26 Feb 2015 12:37:07 +0000 (12:37 +0000)]
'token.h' no longer depends on 'file_info'.

Part of campaign to remove 'stream_lc.h'.

9 years agoNow input stream is simple 'FILE *'.
Ulya Trofimovich [Thu, 26 Feb 2015 12:32:55 +0000 (12:32 +0000)]
Now input stream is simple 'FILE *'.

This is first part of campaign to remove 'stream_lc.h'.

9 years agoDead code elimination.
Ulya Trofimovich [Thu, 26 Feb 2015 11:41:15 +0000 (11:41 +0000)]
Dead code elimination.

9 years agoRemoved unused enum members.
Ulya Trofimovich [Thu, 26 Feb 2015 10:48:41 +0000 (10:48 +0000)]
Removed unused enum members.

I was unsure if delayed generation was also needed for genCondGoto
and genCondTable; so I kept those enum members as a reminder. Now
I know that all conditions are known by the moment re2c block is
parsed and code generation starts.

9 years agoMoved operator definition to where it belongs.
Ulya Trofimovich [Thu, 26 Feb 2015 10:36:16 +0000 (10:36 +0000)]
Moved operator definition to where it belongs.

9 years agoOne pass.
Ulya Trofimovich [Wed, 25 Feb 2015 23:13:55 +0000 (23:13 +0000)]
One pass.

Second pass was used because some information (which influences
early parts of the generated code, e.g enum with condition names
or YYMAXFILL definition) becomes available only at the end of first
pass.

I isolate all (I hope so) these things and generate stubs for them,
which are filled later. I restructured output as follows: the whole
output consists of source and header, each of them is a list of
blocks (corresponding to re2c blocks in source file), each block
is a list of code fragments (which can be either regular strings
with code or stubs that will be filled later).

9 years agoUpdated version to 0.14.1.dev
Ulya Trofimovich [Mon, 23 Feb 2015 18:51:38 +0000 (18:51 +0000)]
Updated version to 0.14.1.dev

9 years agoRelease 0.14. 0.14
Ulya Trofimovich [Mon, 23 Feb 2015 17:28:35 +0000 (17:28 +0000)]
Release 0.14.

9 years agoMakefile.am: added bootstrap/re2c.1 to dist files.
Ulya Trofimovich [Mon, 23 Feb 2015 17:25:26 +0000 (17:25 +0000)]
Makefile.am: added bootstrap/re2c.1 to dist files.

9 years agoMakefile.am: copy re2c.1 to bootstrap files
Ulya Trofimovich [Mon, 23 Feb 2015 17:23:58 +0000 (17:23 +0000)]
Makefile.am: copy re2c.1 to bootstrap files

9 years agoMakefile.am: added forgotten header.
Ulya Trofimovich [Mon, 23 Feb 2015 17:18:02 +0000 (17:18 +0000)]
Makefile.am: added forgotten header.

9 years agoMakefile.am: removed obsolete MSVC files and added forgotten header.
Ulya Trofimovich [Mon, 23 Feb 2015 17:15:40 +0000 (17:15 +0000)]
Makefile.am: removed obsolete MSVC files and added forgotten header.

9 years agoUpdated CHANGELOG and index.html
Ulya Trofimovich [Mon, 23 Feb 2015 17:09:20 +0000 (17:09 +0000)]
Updated CHANGELOG and index.html

9 years agoUpdated docs.
Ulya Trofimovich [Mon, 23 Feb 2015 17:00:45 +0000 (17:00 +0000)]
Updated docs.

9 years agoAdded tests from PHP repository: https://github.com/php/php-src
Ulya Trofimovich [Mon, 23 Feb 2015 13:30:42 +0000 (13:30 +0000)]
Added tests from PHP repository: https://github.com/php/php-src

Test results are almost identical to re2c-0.13.6
(there're some few changes, I believe they are due to
commit 255262b02928d3f38c00dd91952e3253c11c78f1 and
completely harmless).

9 years agoRenamed YYEOI -> YYLESSTHAN
Ulya Trofimovich [Mon, 23 Feb 2015 12:04:38 +0000 (12:04 +0000)]
Renamed YYEOI -> YYLESSTHAN

9 years agoRevert "Renamed re2c primitives:"
Ulya Trofimovich [Mon, 23 Feb 2015 11:50:30 +0000 (11:50 +0000)]
Revert "Renamed re2c primitives:"

This reverts commit 7f816a85b03dd26f279868b1d0eaddb50bc8eb4c.

9 years agoRenamed re2c primitives:
Ulya Trofimovich [Mon, 9 Feb 2015 17:26:36 +0000 (17:26 +0000)]
Renamed re2c primitives:

    YYPEEK       ---> RE2C_PEEK
    YYSKIP       ---> RE2C_SKIP
    YYBACKUP     ---> RE2C_BACKUP
    YYBACKUPCTX  ---> RE2C_BACKUP_CTX
    YYRESTORE    ---> RE2C_RESTORE
    YYRESTORECTX ---> RE2C_RESTORE_CTX
    YYEOI        ---> RE2C_LESS_THAN

Updated tests and examples accordingly.

Renamed functions:

    expr_eoi        ---> expr_less_than
    expr_eoi_one    ---> expr_less_than_one
    stmt_backupctx  ---> stmt_backup_ctx
    stmt_restorectx ---> stmt_restore_ctx

9 years agoFixed changelog formatting on re2c.org.
Ulya Trofimovich [Sun, 18 Jan 2015 20:27:58 +0000 (20:27 +0000)]
Fixed changelog formatting on re2c.org.

9 years agoAdded some examples of "--input custom" usage.
Ulya Trofimovich [Sun, 18 Jan 2015 15:56:06 +0000 (15:56 +0000)]
Added some examples of "--input custom" usage.

Had to modify .gitignore to unmask README in subfolders.

9 years agoReplaced "YYHAS (n)" with "YYEOI (n)".
Ulya Trofimovich [Sun, 18 Jan 2015 14:12:16 +0000 (14:12 +0000)]
Replaced "YYHAS (n)" with "YYEOI (n)".

The actual meaning of this primitive is to check if
there's not enough characters left in the input stream,
e.g. "(YYLIMIT - YYCURSOR) < n" or whatever else.

9 years agoAdded tests for "--input custom".
Ulya Trofimovich [Sun, 18 Jan 2015 13:47:51 +0000 (13:47 +0000)]
Added tests for "--input custom".

This implied modifying runtests.sh, as it couldn't handle
test names of the form "basename.--long-switch.re":
it inserted '-' in front of all switches.

9 years agoRemoved "--input istream".
Ulya Trofimovich [Sun, 18 Jan 2015 13:43:08 +0000 (13:43 +0000)]
Removed "--input istream".

It's impossible to correctly implement this switch in general,
since not all istreams support seek (simplest counterexample:
std::cin).

Even for simple istreams like std::istringstream, proper
error handling requires adding something like "YYERROR ()".

9 years agoA little cleanup of new input API:
Ulya Trofimovich [Tue, 13 Jan 2015 15:30:01 +0000 (15:30 +0000)]
A little cleanup of new input API:

- moved enum and pretty-printing functions to a class
- renamed files 'input.{h,cc}' to 'input_api.{h,cc}'
- for "--input istream": moved input position increment to 'stmt_restorectx'
- main.cc: removed useless include

9 years agoNew input API.
Ulya Trofimovich [Sun, 11 Jan 2015 19:39:32 +0000 (19:39 +0000)]
New input API.

- command-line switch "--input <default | istream | custom>"
- with "--input default" (the default) no changes to generated code
- with "--input istream" assume YYCURSOR is std::istream object
    and YYLIMIT is length of input stream
- with "--input custom" expose primitives:
    YYPEEK ()
    YYSKIP ()
    YYBACKUP ()
    YYBACKUPCTX ()
    YYRESTORE ()
    YYRESTORECTX ()
    YYHAS (n)

10 years agoAdded test for bug #46.
Ulya Trofimovich [Fri, 26 Sep 2014 21:35:28 +0000 (22:35 +0100)]
Added test for bug #46.

10 years agoAdded test for bug #47.
Ulya Trofimovich [Fri, 26 Sep 2014 21:23:54 +0000 (22:23 +0100)]
Added test for bug #47.

10 years agoFixed bug #47: Dot output label escaped characters.
Ulya Trofimovich [Fri, 26 Sep 2014 16:14:20 +0000 (17:14 +0100)]
Fixed bug #47: Dot output label escaped characters.

Double-escape special characters for dot.
Example:
    17 -> 18 [label="\n"]
results in an "unlabeled" arrow in the rendered graph, but
    17 -> 18 [label="\\n"]
is ok.

10 years agoRemoved outdated MSVC files, cleaned .gitignore
Ulya Trofimovich [Fri, 26 Sep 2014 15:15:49 +0000 (16:15 +0100)]
Removed outdated MSVC files, cleaned .gitignore

10 years agoBack up re2c.1 manpage for those who build from git but don't have asciidoc.
Ulya Trofimovich [Fri, 26 Sep 2014 15:14:35 +0000 (16:14 +0100)]
Back up re2c.1 manpage for those who build from git but don't have asciidoc.

10 years agoUpdated version to 0.13.8.dev
Ulya Trofimovich [Wed, 24 Sep 2014 11:09:31 +0000 (12:09 +0100)]
Updated version to 0.13.8.dev

10 years agoRevert "Updated version to 0.13.6.dev"
Ulya Trofimovich [Wed, 24 Sep 2014 11:05:02 +0000 (12:05 +0100)]
Revert "Updated version to 0.13.6.dev"

This reverts commit bbb49c05b95ba951c764a8159e6d461d4a9b6265.

10 years agoUpdated version to 0.13.6.dev
Ulya Trofimovich [Fri, 22 Aug 2014 20:52:46 +0000 (23:52 +0300)]
Updated version to 0.13.6.dev

10 years agoRelease 0.13.7.5. 0.13.7.5
Ulya Trofimovich [Fri, 22 Aug 2014 20:47:11 +0000 (23:47 +0300)]
Release 0.13.7.5.

10 years agoAlternation of 'RegExp's should preserve 'ins_access' attribute.
Ulya Trofimovich [Fri, 22 Aug 2014 20:15:11 +0000 (23:15 +0300)]
Alternation of 'RegExp's should preserve 'ins_access' attribute.

When one builds 'AltOp' from two 'RegExp's, one sometimes has to
break these 'RegExp's in pieces in order to merge their common prefix.
In such cases, if one of the original 'RegExp's has 'ins_access'
set to 'PRIVATE', it is lost (defaults to 'SHARED') after alternation.

This commit fixes Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=518904.

10 years agoReplaced hand-written dynamic type introspection with dynamic_cast.
Ulya Trofimovich [Fri, 22 Aug 2014 20:07:05 +0000 (23:07 +0300)]
Replaced hand-written dynamic type introspection with dynamic_cast.

10 years agoFixed typo in comment.
Ulya Trofimovich [Thu, 21 Aug 2014 10:48:33 +0000 (13:48 +0300)]
Fixed typo in comment.

10 years agorun_tests.sh: set locale "LC_ALL=C" for sed.
Ulya Trofimovich [Tue, 29 Jul 2014 21:05:32 +0000 (00:05 +0300)]
run_tests.sh: set locale "LC_ALL=C" for sed.

This fixes test failure on MacOS X.

10 years agorelease.sh: force directory removal
Ulya Trofimovich [Tue, 29 Jul 2014 15:17:55 +0000 (18:17 +0300)]
release.sh: force directory removal

10 years agoUpdated version to 0.13.7.5.dev
Ulya Trofimovich [Tue, 29 Jul 2014 15:17:10 +0000 (18:17 +0300)]
Updated version to 0.13.7.5.dev

10 years agoRelease 0.13.7.4. 0.13.7.4
Ulya Trofimovich [Tue, 29 Jul 2014 15:11:41 +0000 (18:11 +0300)]
Release 0.13.7.4.

10 years agorelease.sh: don't forget to push as well as push tags
Ulya Trofimovich [Tue, 29 Jul 2014 15:08:07 +0000 (18:08 +0300)]
release.sh: don't forget to push as well as push tags

10 years agorelease.sh: updated to use '--enable-docs' in configure
Ulya Trofimovich [Tue, 29 Jul 2014 15:07:07 +0000 (18:07 +0300)]
release.sh: updated to use '--enable-docs' in configure

10 years agorelease.sh: renamed configure.in -> configure.ac
Ulya Trofimovich [Tue, 29 Jul 2014 15:05:00 +0000 (18:05 +0300)]
release.sh: renamed configure.in -> configure.ac

10 years agoEnable 'make docs' only if configured with '--enable-docs'.
Ulya Trofimovich [Tue, 29 Jul 2014 14:53:49 +0000 (17:53 +0300)]
Enable 'make docs' only if configured with '--enable-docs'.

./configure --enable-docs checks for asciidoc and a2x

10 years agoDisallow to use yacc/byacc instead of bison to build parser.
Ulya Trofimovich [Tue, 29 Jul 2014 11:59:08 +0000 (14:59 +0300)]
Disallow to use yacc/byacc instead of bison to build parser.

Currently parser fails to build with yacc/byacc.
A slightly modified parser, build by byacc, causes 3 tests to fail.

10 years agoRenamed configure.in -> configure.ac
Ulya Trofimovich [Mon, 28 Jul 2014 19:10:04 +0000 (22:10 +0300)]
Renamed configure.in -> configure.ac

10 years agoFixed compile error for freebsd5 (found by Sergei Trofimovich).
Ulya Trofimovich [Mon, 28 Jul 2014 15:57:49 +0000 (18:57 +0300)]
Fixed compile error for freebsd5 (found by Sergei Trofimovich).

Sample error:
    parser.y: In function `void re2c::parse(re2c::Scanner&, std::ostream&, std::ostream*)':
    parser.y:564: error: `yyparse' undeclared (first use this function)

10 years agorun_tests.sh: avoid non-portable sed feature
Ulya Trofimovich [Mon, 28 Jul 2014 15:07:52 +0000 (18:07 +0300)]
run_tests.sh: avoid non-portable sed feature

10 years agorelease.sh: clean tarball directory before rsync'ing to sourceforge
Ulya Trofimovich [Mon, 28 Jul 2014 15:05:22 +0000 (18:05 +0300)]
release.sh: clean tarball directory before rsync'ing to sourceforge

(shouldn't push old tarballs)

10 years agoUpdate version to 0.13.7.4.dev
Ulya Trofimovich [Mon, 28 Jul 2014 15:03:34 +0000 (18:03 +0300)]
Update version to 0.13.7.4.dev

10 years agoRelease 0.13.7.3. 0.13.7.3
Ulya Trofimovich [Mon, 28 Jul 2014 11:08:59 +0000 (14:08 +0300)]
Release 0.13.7.3.

10 years agoGot rid of asciidoc build-time dependency.
Ulya Trofimovich [Mon, 28 Jul 2014 10:58:36 +0000 (13:58 +0300)]
Got rid of asciidoc build-time dependency.

10 years agoFixed compilation warning for clang.
Ulya Trofimovich [Mon, 28 Jul 2014 08:41:19 +0000 (11:41 +0300)]
Fixed compilation warning for clang.

Sample warning:
    warning: struct 'RegExp' was previously declared as a class [-Wmismatched-tags]
    struct RegExp; // forward
    ^

10 years agoUpdated version to 0.13.8.dev.
Ulya Trofimovich [Sun, 27 Jul 2014 08:38:41 +0000 (11:38 +0300)]
Updated version to 0.13.8.dev.

10 years agoRelease 0.13.7.2. 0.13.7.2
Ulya Trofimovich [Sun, 27 Jul 2014 08:20:28 +0000 (11:20 +0300)]
Release 0.13.7.2.

10 years agoMakefile.am: added prerequisites for man page.
Ulya Trofimovich [Sun, 27 Jul 2014 08:14:57 +0000 (11:14 +0300)]
Makefile.am: added prerequisites for man page.

10 years agoMakefile.am: include man page into dist, respect users CXXFLAGS.
Ulya Trofimovich [Sun, 27 Jul 2014 07:11:23 +0000 (10:11 +0300)]
Makefile.am: include man page into dist, respect users CXXFLAGS.

10 years agorelease.sh: allow version of a more general form.
Ulya Trofimovich [Sun, 27 Jul 2014 06:50:53 +0000 (09:50 +0300)]
release.sh: allow version of a more general form.

10 years agoUpdated version to 0.13.8.dev
Ulya Fokanova [Sat, 26 Jul 2014 09:17:27 +0000 (12:17 +0300)]
Updated version to 0.13.8.dev

10 years agoAdded tagging to release.sh
Ulya Fokanova [Sat, 26 Jul 2014 09:07:41 +0000 (12:07 +0300)]
Added tagging to release.sh

10 years agoRelease 0.13.7.1. 0.13.7.1
Ulya Fokanova [Sat, 26 Jul 2014 08:56:24 +0000 (11:56 +0300)]
Release 0.13.7.1.

10 years agoAdded missing headers to tarball and dist-check to release.sh.
Ulya Fokanova [Sat, 26 Jul 2014 08:52:34 +0000 (11:52 +0300)]
Added missing headers to tarball and dist-check to release.sh.

10 years agoUpdate version to 0.13.8.dev
Ulya Fokanova [Fri, 25 Jul 2014 15:51:34 +0000 (18:51 +0300)]
Update version to 0.13.8.dev

10 years agoRelease 0.13.7.
Ulya Fokanova [Fri, 25 Jul 2014 15:44:07 +0000 (18:44 +0300)]
Release 0.13.7.

10 years agoPrepare release 0.13.7.
Ulya Fokanova [Fri, 25 Jul 2014 15:41:53 +0000 (18:41 +0300)]
Prepare release 0.13.7.

10 years agoReduced space taken by Unicode tests (~700MB -> ~14MB).
Ulya Fokanova [Mon, 21 Apr 2014 14:21:57 +0000 (17:21 +0300)]
Reduced space taken by Unicode tests (~700MB -> ~14MB).

Dynamically generate Unicode strings, used in tests,
instead of hardcoding them in source files.

10 years agoAdded tests for '--encoding-policy' option.
Ulya Fokanova [Sun, 13 Apr 2014 11:04:08 +0000 (14:04 +0300)]
Added tests for '--encoding-policy' option.

10 years agoAdded option to control how invalid code points are treated.
Ulya Fokanova [Sun, 13 Apr 2014 10:25:01 +0000 (13:25 +0300)]
Added option to control how invalid code points are treated.

Usage: 're2c --encoding-policy <fail | substitute | ignore> ...'

When re2c encounters invalis code point (e.g., surrogate in Unicode),
it acts with regard to current encoding policy:
    'fail' - fail with error;
    'substitute' - silently substitute offending code point with
        error code point;
    'ignore' - ignore offending code point, consider it valid.

10 years agoMoved encoding-specific character handling to 'Enc' class.
Ulya Fokanova [Wed, 9 Apr 2014 22:56:16 +0000 (01:56 +0300)]
Moved encoding-specific character handling to 'Enc' class.

10 years agoDisallow to set multiple encodings.
Ulya Fokanova [Wed, 9 Apr 2014 22:35:37 +0000 (01:35 +0300)]
Disallow to set multiple encodings.

Fail, if someone tries to set non-ASCII encoding
when another non-ASCII encoding is already set.
If encoding has been set successfully, it is
guaranteed to be valid.

10 years agoMoved 'Range' stuff to separate file.
Ulya Fokanova [Wed, 9 Apr 2014 22:15:40 +0000 (01:15 +0300)]
Moved 'Range' stuff to separate file.

10 years agoMakefile: enabled GCC warnings.
Ulya Fokanova [Wed, 9 Apr 2014 22:00:46 +0000 (01:00 +0300)]
Makefile: enabled GCC warnings.

10 years agoMoved character-printing functions to separate file.
Ulya Fokanova [Wed, 9 Apr 2014 21:48:47 +0000 (00:48 +0300)]
Moved character-printing functions to separate file.