🚧 manual lexer
This commit removed the re2c lexer and replaced it by a manual version. Its integration is not yet complete: number parsing does not respect locales or overflows. Furthermore, parsing does not need to end with EOF. Therefore, a lot of test cases fail. The idea is to push this branch forward so we can conduct performance comparisons. So far, a nice side effect are better diagnosis messages in case of parse errors.
This commit is contained in:
parent
54db53c230
commit
40160f482a
9 changed files with 851 additions and 14699 deletions
13
Makefile
13
Makefile
|
@ -1,9 +1,5 @@
|
|||
.PHONY: pretty clean ChangeLog.md
|
||||
|
||||
# used programs
|
||||
RE2C := $(shell command -v re2c 2> /dev/null)
|
||||
SED = sed
|
||||
|
||||
# main target
|
||||
all:
|
||||
$(MAKE) -C test
|
||||
|
@ -183,13 +179,6 @@ clang_sanitize: clean
|
|||
# maintainer targets
|
||||
##########################################################################
|
||||
|
||||
# create scanner with re2c
|
||||
re2c: src/json.hpp.re2c
|
||||
ifndef RE2C
|
||||
$(error "re2c is not available, please install re2c")
|
||||
endif
|
||||
$(RE2C) -W --utf-8 --encoding-policy fail --bit-vectors --nested-ifs --no-debug-info $< | $(SED) '1d' > src/json.hpp
|
||||
|
||||
# pretty printer
|
||||
pretty:
|
||||
astyle --style=allman --indent=spaces=4 --indent-modifiers \
|
||||
|
@ -197,7 +186,7 @@ pretty:
|
|||
--indent-col1-comments --pad-oper --pad-header --align-pointer=type \
|
||||
--align-reference=type --add-brackets --convert-tabs --close-templates \
|
||||
--lineend=linux --preserve-date --suffix=none --formatted \
|
||||
src/json.hpp src/json.hpp.re2c test/src/*.cpp \
|
||||
src/json.hpp test/src/*.cpp \
|
||||
benchmarks/benchmarks.cpp doc/examples/*.cpp
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue