Skip to content

Commit

Permalink
spell tags correctly; enforce the inverse of partOf
Browse files Browse the repository at this point in the history
  • Loading branch information
grammarware committed Jan 20, 2013
1 parent b9ef08e commit 67f7bad
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion shared/tools/exbgf2xbgf
@@ -1,5 +1,5 @@
#!/bin/sh
# wiki: EBGF
# wiki: EXBGF2XBGF

LOCAL=${PWD}
cd `dirname $0`
Expand Down
2 changes: 1 addition & 1 deletion shared/tools/exbgfover
@@ -1,5 +1,5 @@
#!/bin/sh
# wiki: EBGFover
# wiki: EXBGFover

# Get our hands on basedir
LOCAL1=${PWD}
Expand Down
8 changes: 4 additions & 4 deletions topics/documents/wiki/genHome.py
Expand Up @@ -13,13 +13,13 @@
['BGF','XBGF','CBGF','EXBGF','MegaL','LDF','XLDF','EDD',
'ANF|Abstract Normal Form','LCI','BTF','LCF','Rascal','Prolog','XML','XSD','Factorial Language','Java Language Specification','Grammarware','grammar in a broad sense','Metaprogramming','Grammar programming']
,
['ANTLR2BGF', 'AsFix2BTF', 'BGF2BNF', 'BGF2DMS', 'BGF2dot', 'BGF2HTML', 'BGF2Rascal', 'BGF2SDF', 'BGF2TeX', 'BGF2TXL', 'BTF2BGF', 'BTF2src', 'CBGF2', 'CBGF2CBNF', 'CBGF2XBGF', 'DCG2BGF', 'Ecore2BGF', 'EDD2Rascal', 'EXBGF2XBGF', 'HTML2BGF', 'Java2BGF', 'LDF2BGF', 'LDF2HTML', 'LDF2PDF', 'LDF2SET', 'LDF2TEX', 'LLL2BGF', 'PDF2BGF', 'Py2BGF', 'Rascal2BGF', 'RascalADT2BGF', 'RascalSyntax2BGF', 'SDF2BGF', 'Spec2BGF', 'TXL2BGF', 'XBGF2CBGF', 'XBGF2HTML', 'XBGF2TeX', 'XBGF2XBNF', 'XML2BTF', 'XSD2BGF', 'XSD2LDF']
['ANTLR2BGF', 'AsFix2BTF', 'BGF2BNF', 'BGF2DMS', 'BGF2dot', 'BGF2HTML', 'BGF2Rascal', 'BGF2SDF', 'BGF2TeX', 'BGF2TXL', 'BTF2BGF', 'BTF2source', 'CBGF2', 'CBGF2CBNF', 'CBGF2XBGF', 'DCG2BGF', 'Ecore2BGF', 'EDD2Rascal', 'EXBGF2XBGF', 'HTML2BGF', 'Java2BGF', 'LDF2BGF', 'LDF2HTML', 'LDF2PDF', 'LDF2SET', 'LDF2TEX', 'LLL2BGF', 'PDF2BGF', 'Py2BGF', 'Rascal2BGF', 'RascalADT2BGF', 'RascalSyntax2BGF', 'SDF2BGF', 'Spec2BGF', 'TXL2BGF', 'XBGF2CBGF', 'XBGF2HTML', 'XBGF2TeX', 'XBGF2XBNF', 'XML2BTF', 'XSD2BGF', 'XSD2LDF']
,
['AppendXBGF', 'BGFlc', 'BGFover', 'BGFpp', 'BGFreformat', 'BuildTestSetXml', 'CBGF', 'CheckBGF', 'CheckXBGF', 'EXBGF', 'EXBGFover', 'ExtractOver', 'FindH', 'GBTF', 'GDT|Grammar Diff Tool', 'LCI', 'LDinc', 'MergeBGF', 'NIGDT', 'NormBGF', 'PlotBGF', 'REPP', 'ShowBGF', 'ShowG', 'ShowPNF', 'ShowRootProds', 'ShowT', 'ShowX', 'ShowXBGF', 'ShowXSD', 'TDT', 'TnB', 'TokenOverview', 'Validate', 'XBGF', 'XBGFinfo', 'XBGFlc', 'XBGFover', 'XBGFsliced', 'XBTF', 'XLLL']
['AppendXBGF', 'BGFlc', 'BGFover', 'BGFpp', 'BGFreformat', 'BuildTestSetXml', 'CBGF', 'CheckBGF', 'CheckXBGF', 'EXBGF', 'EXBGFover', 'ExtractOver', 'FindH', 'GBTF', 'GDT|Grammar Diff Tool', 'LCI', 'LDinclude', 'MergeBGF', 'NormBGF', 'PlotBGF', 'REPP', 'ShowBGF', 'ShowG', 'ShowPNF', 'ShowRootProds', 'ShowT', 'ShowX', 'ShowXBGF', 'ShowXSD', 'TDT', 'TnB', 'TokenOverview', 'Validate', 'XBGF', 'XBGFinfo', 'XBGFlc', 'XBGFover', 'XBGFsliced', 'XBTF', 'XLLL']
,
['abridge', 'abstractize', 'addH', 'addV', 'anonymize', 'appear', 'chain', 'concretize', 'deanonymize', 'define', 'designate', 'detour', 'deyaccify', 'disappear', 'distribute', 'downgrade', 'dump', 'eliminate', 'equate', 'extract', 'factor', 'fold', 'horizontal', 'importG', 'inject', 'inline', 'introduce', 'lassoc', 'massage', 'narrow', 'permute', 'project', 'rassoc', 'redefine', 'removeH', 'removeV', 'renameT', 'renameL', 'renameN', 'renameS', 'replace', 'undefine', 'unfold', 'unite', 'unlabel', 'upgrade', 'vertical', 'widen', 'yaccify','bypass','concatT','splitT','splitN']
,
['RetireTs', 'RetireSs', 'RetireLs', 'RenameAll', 'Reroot2top', 'Retire top', 'SubGrammar', 'VerticalAll', 'HorizontalAll', 'DistributeAll', 'VerticalDistributeAll', 'AllDeyacc', 'Retire lazy', 'ANF|Abstract Normal Form', 'FoldG', 'Retire seplists', 'Retire iterations', 'UnchainAll']
['RetireTs', 'RetireSs', 'RetireLs', 'RenameAll', 'Reroot2top', 'RetireTop', 'SubGrammar', 'VerticalAll', 'HorizontalAll', 'DistributeAll', 'VerticalDistributeAll', 'DeyaccifyAll', 'RYaccifyAll', 'LYaccifyAll', 'Retire lazy', 'ANF|Abstract Normal Form', 'FoldG', 'Retire seplists', 'Retire iterations', 'UnchainAll']
]

l = len(h)
Expand All @@ -39,5 +39,5 @@
f.write('|'+'|'.join(['-'*v for v in w])+'|\n')
for i in range(0,l):
while(len(c[i])<d): c[i].append('')
f.write('\n'.join(['|'+'|'.join([c[i][j] and ('[['+c[i][j]+']]').center(w[i]) or ''.center(w[i]) for i in range(0,l)])+'|' for j in range(0,d)]).replace('CBGF','ΞBGF'))
f.write('\n'.join(['|'+'|'.join([c[i][j] and ('[['+c[i][j]+']]').center(w[i]) or ''.center(w[i]) for i in range(0,l)])+'|' for j in range(0,d)]).replace('CBGF','ΞBGF').replace('CBNF','ΞBNF'))
f.close()
2 changes: 1 addition & 1 deletion topics/documents/wiki/texts
Submodule texts updated from 570664 to 98d31c
14 changes: 14 additions & 0 deletions topics/documents/wiki/updOf.py
Expand Up @@ -3,6 +3,8 @@

import os

parts = {}

# * Abridge is a part of [[XBGF]]

for root, dirs, filenames in os.walk('texts'):
Expand All @@ -18,9 +20,21 @@
print '%s claimed to be %s, fixed.' % (expect, what)
changed = True
lines[i] = '* %s is a part of %s' % (expect, lines[i].split(' is a part of ')[-1])
whole = lines[i].split('[[')[1].split(']]')[0]
if whole not in parts.keys():
parts[whole] = []
parts[whole].append(expect)
rd.close()
if changed:
rd = open(os.path.join(root,f),'w')
for line in lines:
rd.write(line)
rd.close()

for big in parts.keys():
f = open('texts/%s.md' % big, 'r')
links = [p.split(']]')[0].upper() for p in ''.join(f.readlines()).split('[[')[1:]]
for small in parts[big]:
if small.upper() not in links:
print '%s does not refer to %s, but totally should.' % (big, small)
f.close()

0 comments on commit 67f7bad

Please sign in to comment.