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 @@ ...@@ -6,14 +6,10 @@
#include <libwccl/parser/Parser.h> #include <libwccl/parser/Parser.h>
%} %}
%include "libcclbool.i" %include "libccltagrule.i"
%include "libccltset.i" %include "libccltagrulesequence.i"
%include "libcclstrset.i" %include "libcclmatchrule.i"
%include "libcclposition.i" %include "libcclwcclfile.i"
%include "libccloperator.i"
// %include "libccltagrule.i"
// %include "libccltagrulesequence.i"
// %include "libcclmatchrule.i"
%include "libcclfunctionaloperator.i" %include "libcclfunctionaloperator.i"
%include "libcorpus/libcorpustagset.i" %include "libcorpus/libcorpustagset.i"
...@@ -89,22 +85,53 @@ namespace Wccl { ...@@ -89,22 +85,53 @@ namespace Wccl {
parseAnyOperator(const std::string& operator_string) const; parseAnyOperator(const std::string& operator_string) const;
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
// shared_ptr<TagRuleSequence>
// parseTagRuleSequence(const std::string& rule_string) const;
// shared_ptr<TagRule> %exception {
// parseSingleRule(const std::string& rule_string) const; 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> %exception {
// parseMatchRule(const std::string& rule_string) const; try {
$action
/* } catch (PwrNlp::PwrNlpError &e) {
* NOT IMPLEMENTED YET! PyErr_SetString(PyExc_IndexError, e.info().c_str());
* ------------------------------------------------ return NULL;
boost::shared_ptr<WcclFile> parseWcclFile( }
const std::string& file_contents_string, }
const std::string& search_path = ".") const; 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