diff options
| author | hallgren <hallgren@chalmers.se> | 2013-12-18 15:31:39 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2013-12-18 15:31:39 +0000 |
| commit | 52494afc5011cad39184861fe88ac16a2fc361e7 (patch) | |
| tree | a188e3241a38bb8ce0c2528ba06476f9188a69d9 | |
| parent | 4012fa15dd3a5589ad1d57c291465065cae58e71 (diff) | |
PGFtoPython: add Python translations for nonExist, BIND and SOFT_BIND
Someone who is familiar with the Python translation should check this.
| -rw-r--r-- | src/compiler/GF/Compile/PGFtoPython.hs | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
