Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
L^3_1 and L^3_2
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@1125 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Nov 22, 2011
1 parent 0e5dc24 commit 9da06a8
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 3 deletions.
24 changes: 24 additions & 0 deletions shared/edd/lll1.edd
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<edd:config xmlns:edd="http://planet-sl.org/edd">
<!-- LLL reference is available at: http://www.cs.vu.nl/grammarware/gdk/ (page 2) -->
<!-- Crafted by Vadim Zaytsev, http://grammarware.net -->
<!-- This dialect definition covers the version published at LDTA -->
<defining-symbol>:</defining-symbol>
<terminator-symbol>;</terminator-symbol>
<definition-separator-symbol>|</definition-separator-symbol>
<!-- Only explicitly marked terminal symbols are allowed -->
<start-terminal-symbol>"</start-terminal-symbol>
<end-terminal-symbol>"</end-terminal-symbol>
<!-- Postfix "repetition" modifiers -->
<postfix-option-symbol>?</postfix-option-symbol>
<postfix-repetition-star-symbol>*</postfix-repetition-star-symbol>
<postfix-repetition-plus-symbol>+</postfix-repetition-plus-symbol>
<!-- Added in order to support nonterminals from other namespaces -->
<nonterminals-may-contain>-/</nonterminals-may-contain>
<ignore>
<!-- Many pretty-printed LLL files contain lots and lots of newlines -->
<newline/>
<!-- Official format for comments -->
<lines-containing>#</lines-containing>
</ignore>
</edd:config>
File renamed without changes.
2 changes: 1 addition & 1 deletion topics/grammars/Makefile.grammar
Expand Up @@ -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
9 changes: 8 additions & 1 deletion 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
9 changes: 8 additions & 1 deletion 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

0 comments on commit 9da06a8

Please sign in to comment.