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

Last change on this file was 5728, checked in by cameron, 13 days ago

The re::Any type now maps to a CC

File size: 748 bytes
Line 
1/*
2 *  Copyright (c) 2017 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 ANY_H
8#define ANY_H
9
10#include "re_re.h"
11#include "re_cc.h"
12#include <UCD/unicode_set.h>
13#include <llvm/Support/Casting.h>
14
15namespace re {
16
17class Any : public RE {
18public:
19    static inline bool classof(const RE * re) {
20        return (re->getClassTypeId() == ClassTypeId::CC) && llvm::cast<CC>(re)->full();
21    }
22    static inline bool classof(const void *) {
23        return false;
24    }
25protected:
26    Any() : RE(ClassTypeId::Any) {}
27    virtual ~Any() {}
28};
29
30inline CC * makeAny() {
31    return makeCC(0, UCD::UNICODE_MAX);
32}
33
34}
35
36#endif // ANY_H
Note: See TracBrowser for help on using the repository browser.