| 1 | /* This file is part of the FaCT++ DL reasoner |
| 2 | Copyright (C) 2003-2015 Dmitry Tsarkov and The University of Manchester |
| 3 | Copyright (C) 2015-2017 Dmitry Tsarkov |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with this library; if not, write to the Free Software |
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | //------------------------------------------------------------------------- |
| 21 | // |
| 22 | // Grammar for FaCT++ |
| 23 | // |
| 24 | //------------------------------------------------------------------------- |
| 25 | #ifndef GRAMMAR_H |
| 26 | #define GRAMMAR_H |
| 27 | |
| 28 | // constants for symbols |
| 29 | enum Token { |
| 30 | AND, |
| 31 | OR, |
| 32 | NOT, |
| 33 | INV, |
| 34 | RCOMPOSITION, // role composition |
| 35 | PROJINTO, // role projection into |
| 36 | PROJFROM, // role projection from |
| 37 | SELF, |
| 38 | |
| 39 | TOP, |
| 40 | BOTTOM, |
| 41 | EXISTS, |
| 42 | FORALL, |
| 43 | GE, |
| 44 | // ATLEAST = GE, |
| 45 | LE, |
| 46 | // ATMOST = LE, |
| 47 | |
| 48 | // common meta-symbols |
| 49 | DATAEXPR, // any data expression: data value, [constrained] datatype |
| 50 | |
| 51 | // more precise ID's discretion |
| 52 | CNAME, // name of a concept |
| 53 | INAME, // name of a singleton |
| 54 | RNAME, // name of a role |
| 55 | DNAME, // name of a data role |
| 56 | }; |
| 57 | |
| 58 | // some multi-case defines |
| 59 | |
| 60 | // any name (like ID) |
| 61 | #define NAME CNAME: case INAME: case RNAME: case DNAME |
| 62 | |
| 63 | #endif |