mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
grammar.py and friends: Implement config file support
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
214c222002
commit
1a7a34f73c
6 changed files with 100 additions and 27 deletions
|
|
@ -12,6 +12,10 @@ ifneq ($(CHECK_SYMBOLS),)
|
|||
OPT_CHECK_SYMBOLS ?= --check-symbols='$(CHECK_SYMBOLS)'
|
||||
endif
|
||||
|
||||
ifneq ($(GENERATE_CONFIG_FILE),)
|
||||
OPT_CONFIG_FILE ?= --config-file=$(GENERATE_CONFIG_FILE)
|
||||
endif
|
||||
|
||||
GENERATED_STD += $(FB_NAME).l $(FB_NAME).y $(FB_NAME).ebnf $(FB_COMMON_H)
|
||||
GENERATED += $(FB_NAME)-dense.ebnf $(GENERATED_STD)
|
||||
GRAMMAR_INPUT ?= $(FB_NAME)-input.ebnf
|
||||
|
|
@ -25,15 +29,15 @@ FB_COMMON_H ?= $(FB_HDRDIR)/$(FB_NAME).h
|
|||
|
||||
INCLUDED_BY_GENERATED += include/defs.h $(FB_COMMON_H) include/lex.$(FB_NAME).h include/$(FB_NAME).tab.h
|
||||
|
||||
|
||||
GENERATE_PY ?= ./generate.py
|
||||
GENERATE ?= python ./$(GENERATE_PY) --log-level $(GENERATE_LOG_LEVEL) create \
|
||||
--fix-extensions $(FIX_EXTENSIONS) \
|
||||
--unroll-lists \
|
||||
--unroll-options \
|
||||
--fix-extensions $(FIX_EXTENSIONS) \
|
||||
--unroll-lists \
|
||||
--unroll-options \
|
||||
--unroll-alternatives \
|
||||
--replace-whitespace \
|
||||
$(OPT_CHECK_SYMBOLS) \
|
||||
$(OPT_CONFIG_FILE) \
|
||||
--trim-symbols=$(shell echo $(TRIM_SYMBOLS) | sed 's/ */,/g') \
|
||||
--cut-symbols=$(shell echo $(CUT_SYMBOLS) | sed 's/ */,/g') \
|
||||
--irrelevant-symbols=$(shell echo $(IRRELEVANT_SYMBOLS) | sed 's/ */,/g') \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue