From c490b3a0b9357441b4bf776af15a860066fcfeee Mon Sep 17 00:00:00 2001 From: grammarware Date: Tue, 5 Aug 2008 17:41:35 +0000 Subject: [PATCH] LCI upgrade git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@137 ab42f6e0-554d-0410-b580-99e487e6eeb2 --- topics/fl/lci/Makefile | 15 +-- topics/fl/lci/fl-lci.cfg | 78 -------------- topics/fl/lci/fl.lcf | 215 +++++++++++++++++++-------------------- 3 files changed, 115 insertions(+), 193 deletions(-) delete mode 100644 topics/fl/lci/fl-lci.cfg diff --git a/topics/fl/lci/Makefile b/topics/fl/lci/Makefile index 8dc3dff0..ed6c3f88 100644 --- a/topics/fl/lci/Makefile +++ b/topics/fl/lci/Makefile @@ -4,7 +4,10 @@ schemata = ../../../shared/xsd build: test: - python ../../convergence/lci/lci.py xml fl.lcf architecture + python ../../convergence/lci/lci.py fl.lcf architecture + @rm -f architecture*.dot + @mv *.bgf bgf + @mv sample* testset check: java -jar ${validator} -warning ${schemata}/lcf.xsd fl.lcf @@ -13,11 +16,9 @@ check: clean: rm -f *~ - rm -f bgf/*.bgf - rm -rf bin - rm -rf obj - rm -f *.user - rm -f *.suo - rm -f sample* + rm -f sample* testset/* *.bgf bgf/*.bgf + rm -rf bin obj + rm -f *.user *.suo rm -f architecture* + rm -f fl.log diff --git a/topics/fl/lci/fl-lci.cfg b/topics/fl/lci/fl-lci.cfg deleted file mode 100644 index e6110587..00000000 --- a/topics/fl/lci/fl-lci.cfg +++ /dev/null @@ -1,78 +0,0 @@ -SHORTCUTS - slps = ../../.. - fl = .. - tools = %slps%/shared/tools - validator = %slps%/download/msv/msv.jar - bgfschema = %slps%/shared/xsd/bgf.xsd - baseldf = %fl%/ldf/fl.ldf - runjava1jar = %fl%/java1/javafl.jar - rundcgdir = %fl%/prolog - -ACTIONS - # extract, diff and test must be present, the rest is optional and completely volatile - # if validate is present, extracted bgfs and all bgfs produced by transformations will be validated with it - # besides shortcuts, one can use these variables: - # %action% - everywhere macro for the name of the action - # %source% - everywhere macro for the name of the source - # %type% - in extract macro for the type of the source - # %arguments% - in extract macro for the extraction arguments - # %first% - in diff macro for the first filename in a pair - # %second% - in diff macro for the second filename in a pair - extract - %tools%/%type%2bgf %arguments% bgf/%source%.bgf - unerase, abstract1, c2a, downcase, h2v, preferdcg, reroot, jaxbdrop, downcase, omdrop, preferjaxb, stripterminals, layering, preferjava, xsdmassage - %tools%/xbgf bgf/%source%.bgf xbgf/%action%.xbgf bgf/%source%.%action%.bgf - validate - java -jar %validator% %bgfschema% bgf/%source%.bgf - diff - %tools%/bdt bgf/%first%.bgf bgf/%second%.bgf - test - xsltproc %slps%/shared/xsl/ldf2samples.xslt %baseldf% >samples.xml - -SOURCES - # three lines: name, type, arguments - xsd - xsd - %fl%/xsd/fl.xsd - antlr - antlr - %fl%/java1/FL.g - om - java - %fl%/java1 types - jaxb - java - %fl%/java3 fl - dcg - dcg - %fl%/prolog/Parser.pro - -TARGETS - # any number of input branches per target - # if more then one input, all results get to be pairwise diffed - java: - reroot preferjaxb omdrop downcase om - reroot jaxbdrop downcase jaxb - xsdjava: - unerase java - xsdmassage preferjava downcase xsd - concrete: - reroot downcase dcg - reroot h2v preferdcg downcase antlr - abstract: - c2a layering stripterminals concrete - abstract1 xsdjava - -IMPLEMENTATIONS - # first line for parser, second for evaluator - # besides shortcuts, one can use these variables: - # %sample% - name of the test case file - # %parsed% - parsing result - # %context% - name of the context file for evaluations - # %yields% - expected evaluation result - antlr - java -cp ${CLASSPATH}:%runjava1jar% -ea TestIO %sample% %parsed% 2>/dev/null - java -cp ${CLASSPATH}:%runjava1jar% -ea TestEvaluator %context% %sample% %yields% 2>/dev/null - dcg - swipl -q -f %rundcgdir%/TestIO.pro -t "main('%sample%','%parsed%')" - swipl -q -f %rundcgdir%/TestEvaluator.pro -t "main('%context%','%sample%',%yields%)" diff --git a/topics/fl/lci/fl.lcf b/topics/fl/lci/fl.lcf index 97d6ca79..59bb8be5 100644 --- a/topics/fl/lci/fl.lcf +++ b/topics/fl/lci/fl.lcf @@ -14,24 +14,6 @@ slps/shared/tools - - validator - - slps/download/msv/msv.jar - - - - bgfschema - - slps/shared/xsd/bgf.xsd - - - - baseldf - - fl/ldf/fl.ldf - - runjava1jar @@ -44,25 +26,29 @@ fl/prolog + - # extract, diff and test must be present, the rest is optional and completely volatile - # if validate is present, extracted bgfs and all bgfs produced by transformations will be validated with it - # besides shortcuts, one can use these variables: - # %action% - everywhere macro for the name of the action - # %source% - everywhere macro for the name of the source - # %type% - in extract macro for the type of the source - # %args% - in extract macro for the extraction arguments - # %1% - in diff macro for the first filename in a pair - # %2% - in diff macro for the second filename in a pair + if validator is present, extracted bgfs and all bgfs produced by transformations will be validated with it - - extract - - - tools/2bgf bgf/.bgf - - - + + validator + + java -jar slps/download/msv/msv.jar slps/shared/xsd/bgf.xsd + + + + diff + + tools/bdt + + + + testset + + xsltproc slps/shared/xsl/ldf2samples.xslt fl/ldf/fl.ldf + + + unerase abstract1 @@ -81,116 +67,129 @@ massageXsd - tools/xbgf bgf/.bgf xbgf/.xbgf bgf/..bgf - - - - - validate - - - java -jar validator bgfschema bgf/.bgf - - - - - diff - - - tools/bdt bgf/.bgf bgf/.bgf - - - - - test - - - xsltproc slps/shared/xsl/ldf2samples.xslt baseldf + tools/xbgf .bgf xbgf/.xbgf ..bgf + antlr - antlr - - - fl/java1/FL.g - - + + + tools/antlr2bgf + + + + fl/java1/FL.g + + + antlr.bgf + + + - java -cp ${CLASSPATH}:runjava1jar -ea TestIO + java -cp ${CLASSPATH}:runjava1jar -ea TestIO - java -cp ${CLASSPATH}:runjava1jar -ea TestEvaluator + java -cp ${CLASSPATH}:runjava1jar -ea TestEvaluator dcg - dcg - - - fl/prolog/Parser.pro - - + + + tools/dcg2bgf + + + + fl/prolog/Parser.pro + + + dcg.bgf + + + - swipl -q -f rundcgdir/TestIO.pro -t "main('','')" + swipl -q -f rundcgdir/TestIO.pro -t "main('','')" - swipl -q -f rundcgdir/TestEvaluator.pro -t "main('','',)" + swipl -q -f rundcgdir/TestEvaluator.pro -t "main('','',)" om - java - - - fl/java1 - - - types - - + + + tools/java2bgf + + + + fl/java1 + + + types + + + om.bgf + + + xsd - xsd - - - fl/xsd/fl.xsd - - + + + tools/xsd2bgf + + + + fl/xsd/fl.xsd + + + xsd.bgf + + + jaxb - java - - - fl/java3 - - - fl - - + + + tools/java2bgf + + + + fl/java3 + + + fl + + + jaxb.bgf + + + + java - om + om downcase trimOm preferJaxb reroot - jaxb + jaxb downcase trimJaxb reroot @@ -199,11 +198,11 @@ xsdjava - java + java unerase - xsd + xsd downcase preferJava massageXsd @@ -212,12 +211,12 @@ concrete - dcg + dcg downcase reroot - antlr + antlr downcase preferDcg horizontal2vertical @@ -227,13 +226,13 @@ abstract - concrete + concrete stripTerminals layering concrete2abstract - xsdjava + xsdjava abstract1