Skip to content

Commit

Permalink
introducing the long-awaited shared/python
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@594 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Apr 13, 2009
1 parent 2c5e263 commit 5787bd4
Show file tree
Hide file tree
Showing 26 changed files with 37 additions and 44 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.
@@ -1,6 +1,8 @@
#!/usr/bin/python
import sys

# post-processor for pretty-printer

mode = 0
for line in sys.stdin:
if mode == 1:
Expand All @@ -11,7 +13,7 @@
tokens = line.split(' ')
lline = tokens[0]
for token in tokens[1:]:
if len(lline + ' ' + token)>55:
if len(lline + ' ' + token)>70:
print lline
lline = ' '*16 + token
else:
Expand Down
File renamed without changes.
Expand Up @@ -281,7 +281,6 @@ def xldf_add_section(cmd,tree):
print '[XLDF] add-section to the',s.tag
success = True
elif s.tag == 'placeholder':
print dir(tree.getroot())
tree.getroot().insert(1,s)
print '[XLDF] add-section to placeholders'
success = True
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion shared/tools/checkbgf
Expand Up @@ -7,5 +7,5 @@ cd ../..
SLPS=${PWD}
cd ${LOCAL1}

python ${SLPS}/topics/presentation/analyses/bgf_check.py $1
python ${SLPS}/shared/python/bgf_check.py $1

2 changes: 1 addition & 1 deletion shared/tools/checkxbgf
Expand Up @@ -7,5 +7,5 @@ cd ../..
SLPS=${PWD}
cd ${LOCAL1}

ls -1 *.xbgf | xargs -n1 python ${SLPS}/topics/presentation/analyses/xbgf_check.py
ls -1 *.xbgf | xargs -n1 python ${SLPS}/shared/python/xbgf_check.py

2 changes: 1 addition & 1 deletion shared/tools/findhoriz
Expand Up @@ -8,6 +8,6 @@ SLPS=${PWD}
cd ${LOCAL1}

${SLPS}/shared/tools/bgf2bnf $1 $1.bnf
python ${SLPS}/topics/presentation/analyses/findHorizontal.py $1.bnf
python ${SLPS}/shared/python/findHorizontal.py $1.bnf
rm -f $1.bnf

19 changes: 19 additions & 0 deletions shared/tools/lci
@@ -0,0 +1,19 @@
#!/bin/sh

LOCAL=${PWD}
cd `dirname $0`
cd ../..
SLPS=${PWD}
cd ${LOCAL}

if [ $# -ne 2 ]; then
echo "Language Convergence Infrastructure"
echo "Usage: lci <input-config> <diagram-prefix>"
exit 1
elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
else
sh ${SLPS}/shared/tools/checkxml lcf $1
python ${SLPS}/shared/python/lci.py $1 $2
fi
2 changes: 1 addition & 1 deletion shared/tools/ldf2html
Expand Up @@ -14,5 +14,5 @@ elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
else
xsltproc ${SLPS}/shared/xsl/ldf2xhtml.xslt $1 | python ${SLPS}/topics/presentation/ldf2pdf/closemeta.py > $2
xsltproc ${SLPS}/shared/xsl/ldf2xhtml.xslt $1 | python ${SLPS}/shared/python/closemeta.py > $2
fi
2 changes: 1 addition & 1 deletion shared/tools/ldf2set
Expand Up @@ -15,5 +15,5 @@ elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
else
python ${SLPS}/topics/extraction/ldf2set/ldf2set.py $1 $2
python ${SLPS}/shared/python/ldf2set.py $1 $2
fi
2 changes: 1 addition & 1 deletion shared/tools/ldf2tex
Expand Up @@ -14,5 +14,5 @@ elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
else
xsltproc ${SLPS}/shared/xsl/ldf2tex.xslt $1 | python ${SLPS}/topics/presentation/prettyprint/postproc.py > $2
xsltproc ${SLPS}/shared/xsl/ldf2tex.xslt $1 | python ${SLPS}/shared/python/pp_pp.py > $2
fi
6 changes: 3 additions & 3 deletions shared/tools/plotbgf
Expand Up @@ -14,6 +14,6 @@ elif [ ! -r $1 ]; then
exit 1
fi

python ${SLPS}/topics/presentation/analyses/bgf_dependency.py $* >`basename $1 .bgf`.dot
dot -Tpdf `basename $1 .bgf`.dot -o `basename $1 .bgf`.pdf
rm -f `basename $1 .bgf`.dot
python ${SLPS}/shared/python/bgf_dependency.py $* > $1.dot
dot -Tpdf $1.dot -o `basename $1 .bgf`.pdf
rm -f $1.dot
2 changes: 1 addition & 1 deletion shared/tools/xldf
Expand Up @@ -18,5 +18,5 @@ elif [ ! -r $2 ]; then
exit 1
else
rm -f $3
python ${SLPS}/topics/transformation/xldf/xldf.py $1 $2 $3
python ${SLPS}/shared/python/xldf.py $1 $2 $3
fi
2 changes: 1 addition & 1 deletion shared/tools/xsd2ldf
Expand Up @@ -17,7 +17,7 @@ elif [ ! -r $1 ]; then
else
rm -f $2
sh ${SLPS}/shared/tools/xsd2bgf $1 $2.bgf
python ${SLPS}/topics/extraction/xsd2ldf/ldfgen.py $1 $2.bgf $2
python ${SLPS}/shared/python/xsd2ldf.py $1 $2.bgf $2
rm -f $2.bgf
fi

5 changes: 0 additions & 5 deletions topics/convergence/lci/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion topics/extraction/ldf2set/Makefile
@@ -1,7 +1,7 @@
build:

test:
python ldf2set.py ../../fl/ldf/fl.ldf samples
../../../shared/tools/ldf2set ../../fl/ldf/fl.ldf samples

clean:
rm -rf samples/* samples.xml *.pyc
22 changes: 0 additions & 22 deletions topics/extraction/xsd2ldf/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion topics/fl/lci/Makefile
Expand Up @@ -4,7 +4,7 @@ validator = ${tools}/checkxml
build:

test:
python ../../convergence/lci/lci.py fl.lcf architecture
${tools}/lci fl.lcf architecture
@rm -f architecture*.dot

check:
Expand Down
2 changes: 1 addition & 1 deletion topics/java/lci/Makefile
Expand Up @@ -3,7 +3,7 @@ validator = ../../../shared/tools/checkxml
build:

test:
python ../../convergence/lci/lci.py java.lcf architecture
../../../shared/tools/lci java.lcf architecture

check:
${validator} lcf java.lcf
Expand Down
2 changes: 1 addition & 1 deletion topics/presentation/prettyprint/Makefile
Expand Up @@ -6,7 +6,7 @@ all:
make check

test:
python ../../convergence/lci/lci.py bnf.lcf architecture
../../../shared/tools/lci bnf.lcf architecture

check:
${validator} lcf bnf.lcf
Expand Down

0 comments on commit 5787bd4

Please sign in to comment.