Skip to content

Commit

Permalink
Parse spaces in LHS/RHS forms, making sure they are quoted appropriat…
Browse files Browse the repository at this point in the history
…ely in the output
  • Loading branch information
coxchristopher committed May 17, 2024
1 parent 64f6270 commit 2bd1649
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/shellscripts/pairs2lexc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Usage: cat pairs.txt | ./pairs2lexc.sh > pairs.lexc

gawk 'BEGIN { output="LEXICON Root\n"; }
gawk 'BEGIN { FS="\t"; output="LEXICON Root\n"; }
{ output=output sprintf("%s:%s # ;\n", $1, $2);
while(match($1,"\\+([^\\+]+)",t)!=0)
{ mchars["+"t[1]]++; sub("\\+"t[1],""); }
Expand All @@ -15,4 +15,4 @@ END { print "Multichar_Symbols";
for(i in mchars) print i;
print "";
print output;
}'
}' | sed "s/ \([^#\;]\)/% \\1/g;s/LEXICON% Root/LEXICON Root/g"

0 comments on commit 2bd1649

Please sign in to comment.