diff options
author | David Young <dyoung@hdfgroup.org> | 2021-03-15 13:16:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 13:16:22 (GMT) |
commit | f6d919a2ab0034a1ee76ca2d5f59f4d8114c4952 (patch) | |
tree | 1850a385e92e3e434c9723fba3de1e870d5703b7 /test/fheap.c | |
parent | 24c83cf73ebb80a58ce92463dac02713d3a4dbf8 (diff) | |
download | hdf5-f6d919a2ab0034a1ee76ca2d5f59f4d8114c4952.zip hdf5-f6d919a2ab0034a1ee76ca2d5f59f4d8114c4952.tar.gz hdf5-f6d919a2ab0034a1ee76ca2d5f59f4d8114c4952.tar.bz2 |
Simplified hl parsing (#399)
* Stop using global variables to share parse context with the lexer.
The lexer uses an unconventional strategy for parsing lexical categories
NUMBER (decimal numbers) and STRING (double-quoted strings) that involves
sharing the parse context with the lexer using global variables. There
are a couple of problems with that. First, the lexer is too complicated
for the simple tokenization it performs—it's hard to tell if it is
correct. Second, as @seanm points out, the shared global variables
spill into the namespace shared by other libraries and application
programs—e.g., VTK.
* Regenerate source files from *.[yl].
* Replace strndup, which isn't available on Windows, with a custom
routine, `trim_quotes`, that produces a copy of its `const char *`
argument with leading and trailing double quotes ('"') removed.
While I am here, remove the unnecessary statement `BEGIN INITIAL;`,
which I should have deleted in a previous commit.
* Regenerate .c from .l.
* You haven't programmed in C until you have programmed in High-Definition
(HD) C.
* \#include "H5private.h" for HD* definitions.
* Regenerate *.[ch] from *.[yl].
Diffstat (limited to 'test/fheap.c')
0 files changed, 0 insertions, 0 deletions