From 52494afc5011cad39184861fe88ac16a2fc361e7 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 18 Dec 2013 15:31:39 +0000 Subject: PGFtoPython: add Python translations for nonExist, BIND and SOFT_BIND Someone who is familiar with the Python translation should check this. --- src/compiler/GF/Compile/PGFtoPython.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compiler/GF/Compile/PGFtoPython.hs') diff --git a/src/compiler/GF/Compile/PGFtoPython.hs b/src/compiler/GF/Compile/PGFtoPython.hs index 608d74f96..57ac92a79 100644 --- a/src/compiler/GF/Compile/PGFtoPython.hs +++ b/src/compiler/GF/Compile/PGFtoPython.hs @@ -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 -- cgit v1.2.3