PGFtoPython: add Python translations for nonExist, BIND and SOFT_BIND

Someone who is familiar with the Python translation should check this.
This commit is contained in:
hallgren
2013-12-18 15:31:39 +00:00
parent 6055ad2f0d
commit 35f86b7d81

View File

@@ -78,6 +78,9 @@ pySymbol (SymVar n l) = pyDict 0 pyStr id [("var", pyTuple 0 show [n, l])]
pySymbol (SymKS t) = pyStr t
pySymbol (SymKP ts alts) = pyDict 0 pyStr id [("pre", pyList 0 pySymbol ts), ("alts", pyList 0 alt2py alts)]
where alt2py (ps,ts) = pyTuple 0 (pyList 0 pyStr) [map pySymbol ps, ts]
pySymbol SymBIND = pyStr "&+"
pySymbol SymSOFT_BIND = pyStr "&+"
pySymbol SymNE = pyDict 0 pyStr id [("nonExist", pyTuple 0 id [])]
----------------------------------------------------------------------
-- python helpers