summaryrefslogtreecommitdiff
path: root/python/src/grammar.pxd
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-07-28 12:11:44 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-07-28 12:11:44 -0400
commit306e0ba4754c6c4f460536cfe8c3f118dc1cc175 (patch)
treead5ea3b0a5370ac613d1bad715fe0f5ab8c91c11 /python/src/grammar.pxd
parent934e55dc12c3f374684bc6a0797e6f85c7abb85a (diff)
parentee5e376e263d9aeabdeee6968b4457f53d3fc772 (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/grammar.pxd')
-rw-r--r--python/src/grammar.pxd13
1 files changed, 8 insertions, 5 deletions
diff --git a/python/src/grammar.pxd b/python/src/grammar.pxd
index 8853a614..833de2e3 100644
--- a/python/src/grammar.pxd
+++ b/python/src/grammar.pxd
@@ -21,17 +21,20 @@ cdef extern from "decoder/trule.h":
void ComputeArity()
cdef extern from "decoder/grammar.h":
- cdef cppclass RuleBin "const RuleBin":
+ cdef cppclass RuleBin:
int GetNumRules()
shared_ptr[TRule] GetIthRule(int i)
int Arity()
- cdef cppclass GrammarIter "const GrammarIter":
- RuleBin* GetRules()
- GrammarIter* Extend(int symbol)
+ ctypedef RuleBin const_RuleBin "const RuleBin"
+
+ cdef cppclass GrammarIter:
+ const_RuleBin* GetRules()
+
+ ctypedef GrammarIter const_GrammarIter "const GrammarIter"
cdef cppclass Grammar:
- GrammarIter* GetRoot()
+ const_GrammarIter* GetRoot()
bint HasRuleForSpan(int i, int j, int distance)
unsigned GetCTFLevels()
string GetGrammarName()