diff options
author | Nicholas <nbnoll@eml.cc> | 2021-11-15 15:08:03 -0800 |
---|---|---|
committer | Nicholas <nbnoll@eml.cc> | 2021-11-15 15:08:14 -0800 |
commit | e9ff1c6fbbbac9ece2604876ab589ac282360446 (patch) | |
tree | 1e1378a1cb37ca4e751d8140eeed99db7ccc4ce7 /src/cmd/rc/rules.mk | |
parent | 27d656be97f1544d7535d8c144ff28b9214aed97 (diff) |
Feat: added if/else branching and switch statement
Unsure about my modification to the language. I found the parsing of the
case body within switches to be odd - specifically that it parses
liberally and then checks that it has case -> cmd structuring while it
walks the code. This means the language is more permissive than the
semantics. I modified it to be more explicit, but at the cost of having
to end each case statement with a semicolon. I wanted a colon, but this
is a valid word character and thus will be lexed as part of the word.
Diffstat (limited to 'src/cmd/rc/rules.mk')
-rw-r--r-- | src/cmd/rc/rules.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/rc/rules.mk b/src/cmd/rc/rules.mk index 76837fc..206c517 100644 --- a/src/cmd/rc/rules.mk +++ b/src/cmd/rc/rules.mk @@ -15,6 +15,7 @@ SRCS_$(d):=\ $(d)/sys.c\ $(d)/wait.c\ $(d)/job.c\ + $(d)/glob.c\ $(d)/exec.c\ $(d)/main.c @@ -23,7 +24,7 @@ BINS_$(d) := $(d)/rc include share/paths.mk $(d)/parse.h $(d)/parse.c: $(d)/syntax.y - yacc --header=$(<D)/parse.h --output=$(<D)/parse.c $(<) + bison --debug --defines=$(<D)/parse.h --output=$(<D)/parse.c $(<) # local rules $(BINS_$(d)): $(OBJS_$(d)) $(OBJ_DIR)/libutf/libutf.a $(OBJ_DIR)/base/base.a $(d)/parse.h |