From 9da06a8f9ec8acaceb2364a2341eeb4b1a50fb23 Mon Sep 17 00:00:00 2001 From: grammarware Date: Tue, 22 Nov 2011 16:19:07 +0000 Subject: [PATCH] L^3_1 and L^3_2 git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@1125 ab42f6e0-554d-0410-b580-99e487e6eeb2 --- shared/edd/lll1.edd | 24 ++++++++++++++++++++ shared/edd/{lll.edd => lll2.edd} | 0 topics/grammars/Makefile.grammar | 2 +- topics/grammars/metasyntax/lll-kort/Makefile | 9 +++++++- topics/grammars/metasyntax/lll-ldta/Makefile | 9 +++++++- 5 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 shared/edd/lll1.edd rename shared/edd/{lll.edd => lll2.edd} (100%) diff --git a/shared/edd/lll1.edd b/shared/edd/lll1.edd new file mode 100644 index 00000000..df402b41 --- /dev/null +++ b/shared/edd/lll1.edd @@ -0,0 +1,24 @@ + + + + + + : + ; + | + + " + " + + ? + * + + + + -/ + + + + + # + + diff --git a/shared/edd/lll.edd b/shared/edd/lll2.edd similarity index 100% rename from shared/edd/lll.edd rename to shared/edd/lll2.edd diff --git a/topics/grammars/Makefile.grammar b/topics/grammars/Makefile.grammar index 797b9614..3e4fa2c7 100644 --- a/topics/grammars/Makefile.grammar +++ b/topics/grammars/Makefile.grammar @@ -6,7 +6,7 @@ hunter = ../../../recovery/hunter/hunter.py rascaldir = ../../../../../rascal/trunk/src/org/rascalmpl/library/lang clean: - rm -f *.bgf *.bnf *.html intermediate.lll tmp.xml *prepared* + rm -f *.bgf *.bnf *.html intermediate.lll tmp.xml *prepared* tgt.* test: ls -1 *.bgf | xargs -n1 ${tooldir}/validate bgf diff --git a/topics/grammars/metasyntax/lll-kort/Makefile b/topics/grammars/metasyntax/lll-kort/Makefile index f6193b25..60945c31 100644 --- a/topics/grammars/metasyntax/lll-kort/Makefile +++ b/topics/grammars/metasyntax/lll-kort/Makefile @@ -1,6 +1,13 @@ extract: - ${hunter} src.manually.fixed.txt ${dialectdir}/lll.edd raw.bgf + ${hunter} src.manually.fixed.txt ${dialectdir}/lll2.edd raw.bgf ${gendir}/reroot2top raw.bgf reroot.prepared.xbgf ${tooldir}/xbgf reroot.prepared.xbgf raw.bgf grammar.bgf +roundtrip: + make extract + ${tooldir}/bgf0edd2bnf grammar.bgf ${dialectdir}/lll2.edd tgt.grammar.txt + cat src.manually.fixed.txt | grep -v '#' > src.prepared.nospace.txt + perl -pi -w -e 's/\s//g;' tgt.grammar.txt src.prepared.nospace.txt + diff tgt.grammar.txt src.prepared.nospace.txt + include ../../Makefile.grammar diff --git a/topics/grammars/metasyntax/lll-ldta/Makefile b/topics/grammars/metasyntax/lll-ldta/Makefile index 4badb679..beef3771 100644 --- a/topics/grammars/metasyntax/lll-ldta/Makefile +++ b/topics/grammars/metasyntax/lll-ldta/Makefile @@ -1,6 +1,13 @@ extract: - ${hunter} src.ldta.2002.txt ${dialectdir}/lll.edd raw.bgf + ${hunter} src.ldta.2002.txt ${dialectdir}/lll1.edd raw.bgf ${gendir}/reroot2top raw.bgf reroot.prepared.xbgf ${tooldir}/xbgf reroot.prepared.xbgf raw.bgf grammar.bgf +roundtrip: + make extract + ${tooldir}/bgf0edd2bnf grammar.bgf ${dialectdir}/lll1.edd tgt.grammar.txt + cat src.ldta.2002.txt | grep -v '#' > src.prepared.nospace.txt + perl -pi -w -e 's/\s//g;' tgt.grammar.txt src.prepared.nospace.txt + diff tgt.grammar.txt src.prepared.nospace.txt + include ../../Makefile.grammar