ewa.ruleparser.RuleParser

Package ewa :: Module ruleparser :: Class RuleParser |
[hide private]
[frames] | no frames]

# Class RuleParser

source code

    object --+
             |
            RuleParser

Instance Methods | [hide private]
t_error(self, t) | source code
t_newline(self, t) \n+ | source code
t_QREGEX(self, t) regex:(?:\'(?:[^\']|\\\')*\'|"(?:[^"]|\\")*") | source code
t_BAREREGEX(self, t) regex:[^ ,:]+ | source code
t_DATE(self, t) (?P<month>0[1-9]|1[012])(?P<sep>-|/|\.)(?P<day>0[1-9]|[12]\d|3[01])(?P=sep)(?P<year>\d{4}) | source code
t_DATETIME(self, t) (?P<month>0[1-9]|1[012])(?P<sep>-|/|\.)(?P<day>0[1-9]|[12]\d|3[01])(?P=sep)(?P<year>\d{4})(?: |(?P=sep))(?P<hour>[01][0-9]|2[0-3])(?P<minute>[0-5]{2}) | source code
t_BAREWORD(self, t) [\w\d/\*\\\?_\.]+ | source code
t_QWORD(self, t) \'(?:[^\']|\\\')*\'|"(?:[^"]|\\")*" | source code
t_COMMENT(self, t) \#.* | source code
p_error(self, p) | source code
p_grammar(self, p) grammar : cond_rule_list | source code
p_cond_rule_list(self, p) cond_rule_list : cond_rule | cond_rule COMMA cond_rule_list | cond_rule cond_rule_list | source code
p_rulelist_1(self, p) rulelist : LBRACK cond_rule_list RBRACK | source code
p_rulelist_2(self, p) rulelist : LBRACK RBRACK | source code
p_cond_rule(self, p) cond_rule : cond COLON rule | rule | source code
_gen_rule(self, cond, data) | source code
p_rule(self, p) rule : simplerule | rulelist | source code
p_simplerule_1(self, p) simplerule : prelist COMMA postlist | source code
p_simplerule_2(self, p) simplerule : prelist postlist | source code
p_simplerule_3(self, p) simplerule : postlist COMMA prelist | source code
p_simplerule_4(self, p) simplerule : postlist prelist | source code
p_simplerule_5(self, p) simplerule : DEFAULT | source code
p_prelist(self, p) prelist : PRE COLON speclist | source code
p_postlist(self, p) postlist : POST COLON speclist | source code
p_speclist_1(self, p) speclist : LBRACK specifier_list RBRACK | source code
p_speclist_2(self, p) speclist : LBRACK RBRACK | source code
p_specifier_list(self, p) specifier_list : specifier | specifier COMMA specifier_list | source code
p_specifier(self, p) specifier : string | source code
p_string(self, p) string : BAREWORD | QWORD | source code
p_cond(self, p) cond : cond_expr | simple_cond | source code
p_cond_expr_1(self, p) cond_expr : cond_op LPAREN cond_list RPAREN | source code
p_cond_expr_2(self, p) cond_expr : NOT LPAREN cond RPAREN | source code
p_cond_list(self, p) cond_list : cond | cond COMMA cond_list | source code
p_cond_op(self, p) cond_op : AND | OR | source code
p_simple_cond(self, p) simple_cond : regex | glob | datespec | source code
p_regex_1(self, p) regex : BAREREGEX | QREGEX | source code
p_regex_2(self, p) regex : BAREREGEX condopts | QREGEX condopts | source code
p_glob_1(self, p) glob : string | source code
p_glob_2(self, p) glob : string condopts | source code
_expand_datefmt(self, fmt) | source code
_gen_datematcher(self, start, end, opts, lineno) | source code
p_datespec_1(self, p) datespec : datetime DASH datetime | date DASH date | datetime DASH date | date DASH datetime | source code
p_datespec_2(self, p) datespec : datetime DASH datetime condopts | date DASH date condopts | datetime DASH date condopts | date DASH datetime condopts | source code
p_datespec_3(self, p) datespec : datecompare datetime | datecompare date | source code
p_datespec_4(self, p) datespec : datecompare datetime condopts | datecompare date condopts | source code
p_condopts(self, p) condopts : LBRACK condopt_list RBRACK | source code
p_condopt_list(self, p) condopt_list : condopt | condopt COMMA condopt_list | source code
p_condopt_1(self, p) condopt : BAREWORD OP BAREWORD | source code
p_condopt_2(self, p) condopt : BAREWORD | source code
p_datecompare(self, p) datecompare : OP | source code
p_date(self, p) date : DATE | source code
p_datetime(self, p) datetime : DATETIME | source code
_resolve_datecompare(self, op, date) | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| reserved = ``(``'``default``'``,` `'``pre``'``,` `'``post``'``,` `'``and``'``,` `'``or``'``,` `'``not``'``)``
| tokens = ``(``'``OP``'``,` `'``BAREWORD``'``,` `'``QWORD``'``,` `'``BAREREGEX``'``,` `'``QREGEX``'``,` `'``D``...``
| t_LPAREN = ``'``\\(``'``
| t_RPAREN = ``'``\\)``'``
| t_LBRACK = ``'``\\[``'``
| t_RBRACK = ``'``\\]``'``
| t_COLON = ``'``:``'``
| t_COMMA = ``'``,``'``
| t_DASH = ``'``-``'``
| t_OP = ``'``<=|>=|<|>|=``'``
| t_ignore = ``'``\t``'``

Properties | [hide private]
Inherited from `object`: `__class__`

Class Variable Details | [hide private]

  ### tokens Value:
      ('OP',
       'BAREWORD',
       'QWORD',
       'BAREREGEX',
       'QREGEX',
       'DATE',
       'DATETIME',
       'DEFAULT',
      ...