Back to index

texmacs  1.0.7.15
packrat.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : packrat.hpp
00004 * DESCRIPTION: efficient packrat parsing
00005 * COPYRIGHT  : (C) 2010  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef PACKRAT_H
00013 #define PACKRAT_H
00014 #include "tree.hpp"
00015 #include "scheme.hpp"
00016 
00017 void   packrat_define (string lan, string s, tree t);
00018 void   packrat_property (string lan, string s, string var, string val);
00019 void   packrat_inherit (string lan, string from);
00020 int    packrat_abbreviation (string lan, string s);
00021 
00022 path   packrat_parse (string lan, string s, tree in);
00023 bool   packrat_correct (string lan, string s, tree in);
00024 bool   packrat_available_path (string lan, tree in, path in_p);
00025 object packrat_context (string lan, string s, tree in, path in_pos);
00026 bool   packrat_select (string lan, string s, tree in, path in_pos,
00027                      path& p1, path& p2, int mode);
00028 
00029 int    encode_color (string s);
00030 string decode_color (int c);
00031 void   packrat_highlight (string lan, string s, tree t);
00032 //array<int> packrat_colors (string lan, string s, tree t);
00033 
00034 #endif // PACKRAT_H