basix_doc 0.1
|
00001 00002 /****************************************************************************** 00003 * MODULE : mmx_syntax.hpp 00004 * DESCRIPTION: Parser and pretty printer for Mathemagix 00005 * COPYRIGHT : (C) 2000 Joris van der Hoeven 00006 ******************************************************************************* 00007 * This software falls under the GNU general public license and comes WITHOUT 00008 * ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details. 00009 * If you don't have this file, write to the Free Software Foundation, Inc., 00010 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00011 ******************************************************************************/ 00012 00013 #ifndef __MMX_SYNTAX_HPP 00014 #define __MMX_SYNTAX_HPP 00015 #include <basix/string.hpp> 00016 #include <basix/list.hpp> 00017 #include <basix/identifiers.hpp> 00018 #include <basix/parse_tools.hpp> 00019 00021 00022 namespace mmx { 00023 00024 extern bool new_lambda_style; 00025 extern bool mmx_abbreviate_coerce; 00026 00027 int mmx_lex (generic* lval, parse_instance* obj); 00028 // lexicographic analyzer 00029 00030 generic mmx_parse (const string &file_name, nat input_number, 00031 const string& s, list<generic>& errors); 00032 // Parse s. 00033 // input_number is relevant in the interactive mode only. 00034 // file_name == "" means stdin. 00035 00036 generic mmx_parse (const string &file_name, const string& s); 00037 // Simplified parse routine of the file 'file_name' with contents 's'. 00038 // Returns an exception in case of errors. 00039 00040 string as_mmx (const generic& g); 00041 string flatten_as_mmx (const generic& g); 00042 string output_as_mmx (const generic& g); 00043 string string_as_mmx (const string& s); 00044 00045 generic texmacs_expand (const generic& g); 00046 // Crude expansion of documents with TeXmacs macros 00047 00048 } 00049 #endif // __MMX_SYNTAX_HPP