source: icGREP/icgrep-devel/icgrep/re/re_parser_prosite.h

Last change on this file was 5218, checked in by xuedongx, 12 months ago

Add parser for PROSITE protein patterns

File size: 927 bytes
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef ICGREP_RE_PARSER_PROSITE_H
8#define ICGREP_RE_PARSER_PROSITE_H
9
10#include <re/re_parser.h>
11
12namespace re {
13    class RE_Parser_PROSITE : public RE_Parser  {
14    public:
15        RE_Parser_PROSITE(const std::string & regular_expression) : RE_Parser(regular_expression) {
16            mReSyntax = RE_Syntax::PROSITE;
17        }
18
19    protected:
20        virtual RE * parse_RE() override;
21        virtual RE * parse_seq() override;
22        virtual RE * extend_item(RE * re) override;
23        virtual RE * parse_next_item() override;
24        virtual std::pair<int, int> parse_range_bound() override;
25       
26    private:
27        RE * parse_prosite_alt();
28        RE * parse_prosite_not();
29    };
30}
31
32
33#endif //ICGREP_RE_PARSER_PROSITE_H
Note: See TracBrowser for help on using the repository browser.