Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
normalization activities go to transformation, not to presentation;
internal tools are introduced; BGF-TXL-BGF progress git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@837 ab42f6e0-554d-0410-b580-99e487e6eeb2
- Loading branch information
1 parent
d6c6929
commit 5061ece
Showing
9 changed files
with
108 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
# Takes in: | ||
# ...<postfix-optional> | ||
# Returns: | ||
# <optional>...</optional> | ||
# And takes in: | ||
# ...<postfix-star> | ||
# Returns: | ||
# <star>...</star> | ||
# And takes in: | ||
# ...<postfix-plus> | ||
# Returns: | ||
# <plus>...</plus> | ||
|
||
LOCAL=${PWD} | ||
cd `dirname $0` | ||
cd ../.. | ||
SLPS=${PWD} | ||
cd ${LOCAL} | ||
|
||
if [ ! -r $1 ]; then | ||
echo "Oops: $1 not found or not readable." | ||
exit 255 | ||
elif [ $# -eq 2 ]; then | ||
/usr/local/bin/xsltproc ${SLPS}/topics/transformation/normalization/postfix2confix.xslt $1 > $2 | ||
else | ||
echo "Internal tool: use at your own risk! Turns postfix iteration constructs to confix ones." | ||
echo "Usage: confixiterations <input> <output>" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
# Takes in: | ||
# repeat ... | ||
# Returns: | ||
# repeat_... | ||
# And takes in: | ||
# opt ... | ||
# Returns: | ||
# opt_... | ||
|
||
LOCAL=${PWD} | ||
cd `dirname $0` | ||
cd ../.. | ||
SLPS=${PWD} | ||
cd ${LOCAL} | ||
|
||
if [ ! -r $1 ]; then | ||
echo "Oops: $1 not found or not readable." | ||
exit 255 | ||
elif [ $# -eq 2 ]; then | ||
cp $1 $2 | ||
perl -pi -w -e 's/repeat statement/repeat_statement/g;' $2 | ||
perl -pi -w -e 's/repeat compound/repeat_compound/g;' $2 | ||
perl -pi -w -e 's/repeat literalOrType/repeat_literalOrType/g;' $2 | ||
perl -pi -w -e 's/repeat literalOrVariable/repeat_literalOrVariable/g;' $2 | ||
perl -pi -w -e 's/repeat barLiteralsAndTypes/repeat_barLiteralsAndTypes/g;' $2 | ||
perl -pi -w -e 's/opt typeRepeater/opt_typeRepeater/g;' $2 | ||
else | ||
echo "Internal tool: use at your own risk! Fixes spaces in XML tag names produced by TXL." | ||
echo "Usage: fixtxlxml <input> <output>" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# Takes in: | ||
# <unknown>(</unknown> | ||
# Returns: | ||
# <sequence><bgf:expression> | ||
# And takes in: | ||
# <unknown>)</unknown> | ||
# Returns: | ||
# </bgf:expression></sequence> | ||
|
||
LOCAL=${PWD} | ||
cd `dirname $0` | ||
cd ../.. | ||
SLPS=${PWD} | ||
cd ${LOCAL} | ||
|
||
if [ ! -r $1 ]; then | ||
echo "Oops: $1 not found or not readable." | ||
exit 255 | ||
elif [ $# -eq 2 ]; then | ||
cp $1 $2 | ||
perl -pi -w -e 's/<unknown>\(<\/unknown>/<sequence><bgf:expression>/g;' $2 | ||
perl -pi -w -e 's/<unknown>\)<\/unknown>/<\/bgf:expression><\/sequence>/g;' $2 | ||
else | ||
echo "Internal tool: use at your own risk! Turns parentheses to BGF sequences." | ||
echo "Usage: markgroups <input> <output>" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
bgfdir = ../../storage/bgf/tests | ||
bgfdir = ../../storage/bgf/tests.small | ||
tooldir = ../../../shared/tools | ||
|
||
test: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.