| OLD | NEW |
| 1 /* | 1 /* |
| 2 * parser classes for MySpell | 2 * parser classes for MySpell |
| 3 * | 3 * |
| 4 * implemented: text, HTML, TeX | 4 * implemented: text, HTML, TeX |
| 5 * | 5 * |
| 6 * Copyright (C) 2002, Laszlo Nemeth | 6 * Copyright (C) 2002, Laszlo Nemeth |
| 7 * | 7 * |
| 8 */ | 8 */ |
| 9 /* ***** BEGIN LICENSE BLOCK ***** |
| 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 11 * |
| 12 * The contents of this file are subject to the Mozilla Public License Version |
| 13 * 1.1 (the "License"); you may not use this file except in compliance with |
| 14 * the License. You may obtain a copy of the License at |
| 15 * http://www.mozilla.org/MPL/ |
| 16 * |
| 17 * Software distributed under the License is distributed on an "AS IS" basis, |
| 18 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| 19 * for the specific language governing rights and limitations under the |
| 20 * License. |
| 21 * |
| 22 * The Original Code is Hunspell, based on MySpell. |
| 23 * |
| 24 * The Initial Developers of the Original Code are |
| 25 * Kevin Hendricks (MySpell) and Németh László (Hunspell). |
| 26 * Portions created by the Initial Developers are Copyright (C) 2002-2005 |
| 27 * the Initial Developers. All Rights Reserved. |
| 28 * |
| 29 * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, |
| 30 * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, |
| 31 * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, |
| 32 * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, |
| 33 * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen |
| 34 * |
| 35 * Alternatively, the contents of this file may be used under the terms of |
| 36 * either the GNU General Public License Version 2 or later (the "GPL"), or |
| 37 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
| 38 * in which case the provisions of the GPL or the LGPL are applicable instead |
| 39 * of those above. If you wish to allow use of your version of this file only |
| 40 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 41 * use your version of this file under the terms of the MPL, indicate your |
| 42 * decision by deleting the provisions above and replace them with the notice |
| 43 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 44 * the provisions above, a recipient may use your version of this file under |
| 45 * the terms of any one of the MPL, the GPL or the LGPL. |
| 46 * |
| 47 * ***** END LICENSE BLOCK ***** */ |
| 9 | 48 |
| 10 #ifndef _LATEXPARSER_HXX_ | 49 #ifndef LATEXPARSER_HXX_ |
| 11 #define _LATEXPARSER_HXX_ | 50 #define LATEXPARSER_HXX_ |
| 12 | |
| 13 | 51 |
| 14 #include "textparser.hxx" | 52 #include "textparser.hxx" |
| 15 | 53 |
| 16 /* | 54 /* |
| 17 * HTML Parser | 55 * HTML Parser |
| 18 * | 56 * |
| 19 */ | 57 */ |
| 20 | 58 |
| 21 class LaTeXParser : public TextParser | 59 class LaTeXParser : public TextParser { |
| 22 { | 60 int pattern_num; // number of comment |
| 23 int pattern_num; // number of comment | 61 int depth; // depth of blocks |
| 24 int depth; // depth of blocks | 62 int arg; // arguments's number |
| 25 int arg; // arguments's number | 63 int opt; // optional argument attrib. |
| 26 int opt; // optional argument attrib. | |
| 27 | 64 |
| 28 public: | 65 public: |
| 29 | 66 explicit LaTeXParser(const char* wc); |
| 30 LaTeXParser(const char * wc); | 67 LaTeXParser(const w_char* wordchars, int len); |
| 31 LaTeXParser(unsigned short * wordchars, int len); | |
| 32 virtual ~LaTeXParser(); | 68 virtual ~LaTeXParser(); |
| 33 | 69 |
| 34 virtual char * next_token(); | 70 virtual bool next_token(std::string&); |
| 35 | 71 |
| 36 private: | 72 private: |
| 37 | 73 int look_pattern(int col); |
| 38 int look_pattern(int col); | |
| 39 | |
| 40 }; | 74 }; |
| 41 | 75 |
| 42 | |
| 43 #endif | 76 #endif |
| 44 | |
| OLD | NEW |