Skip to content

Commit

Permalink
wrappers have their own dir now; WIP on LCI
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@226 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Sep 3, 2008
1 parent b281f8f commit d8d752b
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 55 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 31 additions & 3 deletions shared/xsd/lcf.xsd
Expand Up @@ -65,9 +65,37 @@
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string" />
<xsd:element name="extraction" type="lcf:xstring" />
<xsd:element name="parsing" type="lcf:xstring" minOccurs="0" />
<xsd:element name="evaluation" type="lcf:xstring" minOccurs="0" />
<xsd:element name="grammar">
<xsd:complexType>
<xsd:annotation>
<xsd:documentation>
This extractor must take a grammar in its source format and output the corresponding BGF.
This parser must take a test case, try to parse it and report through exit status.
This evaluator must take a test case, try to evaluate it and report through exit status.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="extraction" type="lcf:xstring" />
<xsd:element name="parsing" type="lcf:xstring" minOccurs="0" />
<xsd:element name="evaluation" type="lcf:xstring" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="tree" minOccurs="0">
<xsd:complexType>
<xsd:annotation>
<xsd:documentation>
This extractor must take a BGF and a source file and output the corresponding BTF.
There is no parser since a valid BTF always parses.
This evaluator must take a BTF, try to evaluate it and report through exit status.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="extraction" type="lcf:xstring" />
<xsd:element name="evaluation" type="lcf:xstring" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="testing" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
Expand Down
12 changes: 6 additions & 6 deletions topics/convergence/lci/lci.py
Expand Up @@ -59,12 +59,12 @@ def readxmlconfig (cfg):
testsets[outline.findtext('name')]=expandxml(outline.findall('command')[0],{})
# sources
for outline in config.findall('//source'):
extractor[outline.findtext('name')]=expandxml(outline.findall('extraction')[0],{})
extractor[outline.findtext('name')]=expandxml(outline.findall('grammar/extraction')[0],{})
pcmd = ecmd = ''
if outline.findall('parsing'):
parser[outline.findtext('name')]=expandxml(outline.findall('parsing')[0],{})
if outline.findall('evaluation'):
evaluator[outline.findtext('name')]=expandxml(outline.findall('evaluation')[0],{})
if outline.findall('grammar/parsing'):
parser[outline.findtext('name')]=expandxml(outline.findall('grammar/parsing')[0],{})
if outline.findall('grammar/evaluation'):
evaluator[outline.findtext('name')]=expandxml(outline.findall('grammar/evaluation')[0],{})
tmp = []
for set in outline.findall('testing/set'):
tmp.append(set.text)
Expand Down Expand Up @@ -419,7 +419,7 @@ def checkconsistency():
#sysexit(8)

if __name__ == "__main__":
print 'Language Covergence Infrastructure v1.10'
print 'Language Covergence Infrastructure v1.10alpha'
if len(sys.argv) == 3:
log = open(sys.argv[1].split('.')[0]+'.log','w')
readxmlconfig(sys.argv[1])
Expand Down
122 changes: 76 additions & 46 deletions topics/fl/lci/fl.lcf
Expand Up @@ -17,7 +17,15 @@
<expand>slps</expand>/shared/tools
</expansion>
</shortcut>

<shortcut>
<name>wrappers</name>
<expansion>
<expand>slps</expand>/shared/wrappers
</expansion>
</shortcut>


<tool>
<name>validation</name>
<command>
Expand All @@ -38,6 +46,7 @@
<expand>tools</expand>/xbgf
</command>
</tool>


<testset>
<name>xmlsamples</name>
Expand All @@ -53,91 +62,112 @@
</command>
</testset>


<source>
<name>antlr</name>
<extraction>
<expand>tools</expand>/antlr2bgf <expand>fl</expand>/java1/FL.g
</extraction>
<parsing>
<expand>tools</expand>/runantlrparser
</parsing>
<evaluation>
<expand>tools</expand>/runantlrevaluator
</evaluation>
<grammar>
<extraction>
<expand>tools</expand>/antlr2bgf <expand>fl</expand>/java1/FL.g
</extraction>
<parsing>
<expand>wrappers</expand>/runantlrparser
</parsing>
<evaluation>
<expand>wrappers</expand>/runantlrevaluator
</evaluation>
</grammar>
<testing>
<set>codesamples</set>
</testing>
</source>

<source>
<name>dcg</name>
<extraction>
<expand>tools</expand>/dcg2bgf <expand>fl</expand>/prolog1/Parser.pro
</extraction>
<parsing>
<expand>tools</expand>/runprologparser
</parsing>
<evaluation>
<expand>tools</expand>/runprologevaluator
</evaluation>
<grammar>
<extraction>
<expand>tools</expand>/dcg2bgf <expand>fl</expand>/prolog1/Parser.pro
</extraction>
<parsing>
<expand>wrappers</expand>/runprologparser
</parsing>
<evaluation>
<expand>wrappers</expand>/runprologevaluator
</evaluation>
</grammar>
<testing>
<set>codesamples</set>
</testing>
</source>

<source>
<name>sdf</name>
<extraction>
<expand>tools</expand>/sdf2bgf <expand>fl</expand>/asfsdf/*.sdf
</extraction>
<parsing>
<expand>tools</expand>/runasfsdfparser
</parsing>
<evaluation>
<expand>tools</expand>/runasfsdfevaluator
</evaluation>
<grammar>
<extraction>
<expand>tools</expand>/sdf2bgf <expand>fl</expand>/asfsdf/*.sdf
</extraction>
<parsing>
<expand>wrappers</expand>/runasfsdfparser
</parsing>
<evaluation>
<expand>wrappers</expand>/runasfsdfevaluator
</evaluation>
</grammar>
<testing>
<set>codesamples</set>
</testing>
</source>

<source>
<name>om</name>
<extraction>
<expand>tools</expand>/java2bgf <expand>fl</expand>/java1 types
</extraction>
<grammar>
<extraction>
<expand>tools</expand>/java2bgf <expand>fl</expand>/java1 types
</extraction>
</grammar>
</source>

<source>
<name>xml</name>
<extraction>
<expand>tools</expand>/xsd2bgf <expand>fl</expand>/xsd/fl.xsd
</extraction>
<parsing>
<expand>tools</expand>/runxsdparser
</parsing>
<evaluation>
<expand>tools</expand>/runxqueryevaluator
</evaluation>
<grammar>
<extraction>
<expand>tools</expand>/xsd2bgf <expand>fl</expand>/xsd/fl.xsd
</extraction>
<parsing>
<expand>wrappers</expand>/runxsdparser
</parsing>
<evaluation>
<expand>wrappers</expand>/runxqueryevaluator
</evaluation>
</grammar>
<tree>
<extraction>
<expand>tools</expand>/xml2btf <expand>fl</expand>/xsd/fl.xsd
</extraction>
</tree>
<testing>
<set>xmlsamples</set>
</testing>
</source>

<source>
<name>jaxb</name>
<extraction>
<expand>tools</expand>/java2bgf <expand>fl</expand>/java3 fl
</extraction>
<grammar>
<extraction>
<expand>tools</expand>/java2bgf <expand>fl</expand>/java3 fl
</extraction>
</grammar>
</source>

<source>
<name>ldf</name>
<extraction>
<expand>tools</expand>/ldf2bgf <expand>fl</expand>/ldf/fl.ldf
</extraction>
<grammar>
<extraction>
<expand>tools</expand>/ldf2bgf <expand>fl</expand>/ldf/fl.ldf
</extraction>
</grammar>
</source>


<target>
<name>java</name>
<branch>
Expand Down Expand Up @@ -206,4 +236,4 @@
</branch>
</target>

</lcf:configuration>
</lcf:configuration>

0 comments on commit d8d752b

Please sign in to comment.