Open mingodad opened 1 month ago
Also to be able to build miranda
on Ubntu 18.04 I needed to change a bit the sed
filters applied to .host
see diff bellow:
----------------------------------- Makefile -----------------------------------
index 5f7ec73..b36859d 100644
@@ -20,7 +20,7 @@ mira: big.o cmbnms.o data.o lex.o reduce.o steer.o trans.o types.o y.tab.o \
version.c miralib/.version Makefile .host
$(CC) $(CFLAGS) -DVERS=`cat miralib/.version` \
-DVDATE="\"`git show -s --format=%cd --date=format:'%d %b %Y'`\"" \
- -DHOST="`cat .host`" version.c cmbnms.o y.tab.o data.o lex.o \
+ -DHOST="\"`cat .host`\"" version.c cmbnms.o y.tab.o data.o lex.o \
big.o reduce.o steer.o trans.o types.o -lm -o mira
strip mira$(EX)
.host:
@@ -28,7 +28,7 @@ mira: big.o cmbnms.o data.o lex.o reduce.o steer.o trans.o types.o y.tab.o \
@echo $(CC) $(CFLAGS) >> .host
$(CC) -v 2>> .host
sed -i 's/.*/&\\\\n/' .host
- sed -i 's/\\n /\\n/g' .host
+ sed -i -z 's/\n//g' .host
y.tab.c y.tab.h: rules.y
$(YACC) -d rules.y
big.o cmbns.o data.o lex.o reduce.o steer.o trans.o types.o y.tab.o: \
Using a modified
byacc
(https://github.com/mingodad/lalr-parser-test/tree/main/byacc) that can export anEBNF
understood by (IPV4) https://rr.red-dove.com/ui or (IPV6) https://www.bottlecaps.de/rr/ui that generates a nice navigable railroad diagram for the grammar in https://github.com/ncihnegn/miranda/blob/master/rules.y (see the instruction bellow at the top).