From 1ed736c4179099ab2cce336224b2e310e8c8396b Mon Sep 17 00:00:00 2001 From: grammarware Date: Sun, 12 Dec 2010 00:34:16 +0000 Subject: [PATCH] enforcing the naming convention; Ecore test set baselines are stored in BGF and not in BNF now git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@905 ab42f6e0-554d-0410-b580-99e487e6eeb2 --- shared/tools/ecore2bgf | 4 +- .../extraction/{ecore2bgf => ecore}/Makefile | 8 +- .../extraction/ecore}/ecore2bgf.xslt | 0 topics/extraction/ecore/fl1.baseline | 251 ++++++++++++++++++ topics/extraction/ecore/fl2.baseline | 217 +++++++++++++++ topics/extraction/ecore2bgf/fl1.baseline | 30 --- topics/extraction/ecore2bgf/fl2.baseline | 24 -- 7 files changed, 473 insertions(+), 61 deletions(-) rename topics/extraction/{ecore2bgf => ecore}/Makefile (52%) rename {shared/xsl => topics/extraction/ecore}/ecore2bgf.xslt (100%) create mode 100644 topics/extraction/ecore/fl1.baseline create mode 100644 topics/extraction/ecore/fl2.baseline delete mode 100644 topics/extraction/ecore2bgf/fl1.baseline delete mode 100644 topics/extraction/ecore2bgf/fl2.baseline diff --git a/shared/tools/ecore2bgf b/shared/tools/ecore2bgf index bd2eeaa9..7a196900 100755 --- a/shared/tools/ecore2bgf +++ b/shared/tools/ecore2bgf @@ -11,9 +11,9 @@ if [ ! -r $1 ]; then exit 1 elif [ $# -eq 2 ]; then rm -f $2 - xsltproc ${SLPS}/shared/xsl/ecore2bgf.xslt $1 > $2 + xsltproc ${SLPS}/topics/extraction/ecore/ecore2bgf.xslt $1 > $2 elif [ $# -eq 1 ]; then - xsltproc ${SLPS}/shared/xsl/ecore2bgf.xslt $1 > ${LOCAL}/`basename $1 .ecore`.bgf + xsltproc ${SLPS}/topics/extraction/ecore/ecore2bgf.xslt $1 > ${LOCAL}/`basename $1 .ecore`.bgf else echo "This tool extracts a BGF grammar from an Ecore model" echo "Usage: ecore2bgf []" diff --git a/topics/extraction/ecore2bgf/Makefile b/topics/extraction/ecore/Makefile similarity index 52% rename from topics/extraction/ecore2bgf/Makefile rename to topics/extraction/ecore/Makefile index 43e0d8ce..4b36b747 100755 --- a/topics/extraction/ecore2bgf/Makefile +++ b/topics/extraction/ecore/Makefile @@ -7,10 +7,8 @@ test: make clean ../../../shared/tools/ecore2bgf ${source1} ${target1}.bgf ../../../shared/tools/ecore2bgf ${source2} ${target2}.bgf - ../../../shared/tools/bgf2bnf ${target1}.bgf ${target1}.out - ../../../shared/tools/bgf2bnf ${target2}.bgf ${target2}.out - diff ${target1}.out ${target1}.baseline - diff ${target2}.out ${target2}.baseline + ../../../shared/tools/gdt ${target1}.bgf ${target1}.baseline + ../../../shared/tools/gdt ${target2}.bgf ${target2}.baseline clean: - rm -f *.bgf *.out + rm -f *.bgf *~ diff --git a/shared/xsl/ecore2bgf.xslt b/topics/extraction/ecore/ecore2bgf.xslt similarity index 100% rename from shared/xsl/ecore2bgf.xslt rename to topics/extraction/ecore/ecore2bgf.xslt diff --git a/topics/extraction/ecore/fl1.baseline b/topics/extraction/ecore/fl1.baseline new file mode 100644 index 00000000..63d8021b --- /dev/null +++ b/topics/extraction/ecore/fl1.baseline @@ -0,0 +1,251 @@ + + + + Program + + + + + function + + Function + + + + + + + + Function + + + + + name + + string + + + + + + + + argument + + Argument + + + + + + + + definition + + Exp + + + + + + + + Argument + + + name + + string + + + + + + Exp + + + + LiteralExp + + + ArgumentExp + + + IfThenElseExp + + + ApplyExp + + + BinaryExp + + + + + + LiteralExp + + + value + + int + + + + + + ArgumentExp + + + argument + + Argument + + + + + + IfThenElseExp + + + + + if + + Exp + + + + + + then + + Exp + + + + + + else + + Exp + + + + + + + + ApplyExp + + + + + function + + Function + + + + + + + + argument + + Exp + + + + + + + + + + BinaryExp + + + + PlusExp + + + MinusExp + + + EqualExp + + + + + + PlusExp + + + + + left + + Exp + + + + + + right + + Exp + + + + + + + + MinusExp + + + + + left + + Exp + + + + + + right + + Exp + + + + + + + + EqualExp + + + + + left + + Exp + + + + + + right + + Exp + + + + + + + diff --git a/topics/extraction/ecore/fl2.baseline b/topics/extraction/ecore/fl2.baseline new file mode 100644 index 00000000..777581af --- /dev/null +++ b/topics/extraction/ecore/fl2.baseline @@ -0,0 +1,217 @@ + + + + Apply + + + + + name + + string + + + + + + + + arg + + Expr + + + + + + + + + + Argument + + + name + + string + + + + + + Binary + + + + + ops + + Ops + + + + + + left + + Expr + + + + + + right + + Expr + + + + + + + + Expr + + + + Apply + + + Argument + + + Binary + + + IfThenElse + + + Literal + + + + + + Function + + + + + name + + string + + + + + + + + arg + + string + + + + + + + + rhs + + Expr + + + + + + + + IfThenElse + + + + + ifExpr + + Expr + + + + + + thenExpr + + Expr + + + + + + elseExpr + + Expr + + + + + + + + Literal + + + info + + int + + + + + + Ops + + + + + Equal + + + + + + + + Plus + + + + + + + + Minus + + + + + + + + + + ProgramType + + + + + function + + Function + + + + + + + diff --git a/topics/extraction/ecore2bgf/fl1.baseline b/topics/extraction/ecore2bgf/fl1.baseline deleted file mode 100644 index bde3abb8..00000000 --- a/topics/extraction/ecore2bgf/fl1.baseline +++ /dev/null @@ -1,30 +0,0 @@ -Program: - function::Function+ -Function: - name::STR argument::Argument+ definition::Exp -Argument: - name::STR -Exp: - LiteralExp - ArgumentExp - IfThenElseExp - ApplyExp - BinaryExp -LiteralExp: - value::INT -ArgumentExp: - argument::Argument -IfThenElseExp: - if::Exp then::Exp else::Exp -ApplyExp: - function::Function argument::Exp+ -BinaryExp: - PlusExp - MinusExp - EqualExp -PlusExp: - left::Exp right::Exp -MinusExp: - left::Exp right::Exp -EqualExp: - left::Exp right::Exp diff --git a/topics/extraction/ecore2bgf/fl2.baseline b/topics/extraction/ecore2bgf/fl2.baseline deleted file mode 100644 index 6b9200b4..00000000 --- a/topics/extraction/ecore2bgf/fl2.baseline +++ /dev/null @@ -1,24 +0,0 @@ -Apply: - name::STR arg::Expr+ -Argument: - name::STR -Binary: - ops::Ops left::Expr right::Expr -Expr: - Apply - Argument - Binary - IfThenElse - Literal -Function: - name::STR arg::STR+ rhs::Expr -IfThenElse: - ifExpr::Expr thenExpr::Expr elseExpr::Expr -Literal: - info::INT -Ops: - Equal::EPSILON - Plus::EPSILON - Minus::EPSILON -ProgramType: - function::Function+