Use epicsFindSymbol() to build a dynamic and idempotent equivalent
to the code generated by registerRecordDeviceDriver.pl
Also add runRegistrarOnce() to prevent registrars
from running multiple times, except from unittest code.
These changes to the functions epicsStrnRawFromEscaped() and
epicsStrnEscapedFromRaw() were prompted by the addition of JSON5
support to the dbStatic parser.
* \0 now represents a zero byte
* Unprintable characters are now escaped in hex
Tests for the octal escapes have been removed.
\x only takes 2 hex digits now, and the octal parser ignores a 3rd
digit if it would take the value over 0xff:
"\400" => ' ' then '0'
"\x088" => '\b' then '8'
With additional tests.
Our bare-word character set is wider than JSON5's. Quote any
keys containing the extra characters so YAJL can parse them,
but don't quote keys unnecessarily.
Tests for this behavior are in dbStaticTest.db
Adjust the other tests that read links parsed by the dbStatic
parser that used bareword keys, which are no longer quoted.
dbLex.l acceps a leading or trailing decimal point with float/double
values and an explicit leading + on all numbers.
Tested in dbStaticTest.db but only passing tests.
Teach the lexer/parser to recognize and decode them in JSON5 mode.
Teach the encoder to use them in JSON5 mode.
Add another error message for bad hex digits.
Test cases to show they work, and that the bad-digit check fires.
Any character other than the digits 1-9 may be preceded by a
reverse solidus '\', and unless the combination has an explicitly
defined expansion the character is included without the solidus.
JSON5 adds \', \0 and \v to the set of defined escapes, and an
escaped newline is omitted from a string.
In the test case Perl uses \13 instead of \v in the output
but it is the correct character (13 octal = 11 decimal = '\v').
Adds another lexer entry point for lexing map keys only,
adjust parser to use this instead of the general lexer.
Also defines another lexer token for internal use only.
NaN and both Infinities, with tests.
Special handling was added to yajl_test since different OSs don't
always generate the same output for special numbers (nan/NaN/...).
If configured for JSON5 the lexer now allows a leading or trailing
decimal point on doubles, and an explicit leading + sign on integers
or double numbers.
Includes test cases.