summaryrefslogtreecommitdiff
path: root/decoder/rule_lexer.h
blob: e15c056d2d5aa650b4b37659fb9602818792ea6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef _RULE_LEXER_H_
#define _RULE_LEXER_H_

#include <iostream>
#include <string>

#include "trule.h"

struct RuleLexer {
  typedef void (*RuleCallback)(const TRulePtr& new_rule, const unsigned int ctf_level, const TRulePtr& coarse_rule, void* extra);
  static void ReadRules(std::istream* in, RuleCallback func, const std::string& fname, void* extra);
  static void ReadRule(const std::string&, RuleCallback func, bool mono_rule, void* extra);
};

#endif