Skip to content
Snippets Groups Projects
Commit 36a0d4f5 authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

(swig) Added methods: parseTagRuleSequence, parseSingleRule, parseMatchRule, parseWcclFile

parent 558fde86
No related merge requests found
......@@ -6,14 +6,10 @@
#include <libwccl/parser/Parser.h>
%}
%include "libcclbool.i"
%include "libccltset.i"
%include "libcclstrset.i"
%include "libcclposition.i"
%include "libccloperator.i"
// %include "libccltagrule.i"
// %include "libccltagrulesequence.i"
// %include "libcclmatchrule.i"
%include "libccltagrule.i"
%include "libccltagrulesequence.i"
%include "libcclmatchrule.i"
%include "libcclwcclfile.i"
%include "libcclfunctionaloperator.i"
%include "libcorpus/libcorpustagset.i"
......@@ -89,22 +85,53 @@ namespace Wccl {
parseAnyOperator(const std::string& operator_string) const;
/* --------------------------------------------------------------------- */
// shared_ptr<TagRuleSequence>
// parseTagRuleSequence(const std::string& rule_string) const;
// shared_ptr<TagRule>
// parseSingleRule(const std::string& rule_string) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<TagRuleSequence>
parseTagRuleSequence(const std::string& rule_string) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<TagRule>
parseSingleRule(const std::string& rule_string) const;
// boost::shared_ptr<MatchRule>
// parseMatchRule(const std::string& rule_string) const;
/*
* NOT IMPLEMENTED YET!
* ------------------------------------------------
boost::shared_ptr<WcclFile> parseWcclFile(
const std::string& file_contents_string,
const std::string& search_path = ".") const;
*/
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<MatchRule>
parseMatchRule(const std::string& rule_string) const;
/* --------------------------------------------------------------------- */
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<WcclFile> parseWcclFile(
const std::string& file_contents_string,
const std::string& search_path = ".") const;
/* --------------------------------------------------------------------- */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment