X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathParser.h;h=c4ae6f89949bf3bb93e1b6edd82531a79743b805;hb=f67cf6f4bb3e3d22ac9aebfa22027c3537cbdf61;hp=43b6f920909dab900d66e1c87a5501fff29d6459;hpb=f505227f6e0815379b45d268a9674a485ae55aeb;p=lyx.git diff --git a/src/mathed/MathParser.h b/src/mathed/MathParser.h index 43b6f92090..c4ae6f8994 100644 --- a/src/mathed/MathParser.h +++ b/src/mathed/MathParser.h @@ -5,7 +5,7 @@ * Licence details can be found in the file COPYING. * * \author Alejandro Aguilar Sierra - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -13,12 +13,15 @@ #ifndef MATH_PARSER_H #define MATH_PARSER_H +#include "MathParser_flags.h" + #include "support/types.h" #include "support/docstring.h" namespace lyx { +class Buffer; class MathAtom; class MathData; class InsetMathGrid; @@ -58,21 +61,26 @@ public: /// check whether this is a well-known (La)TeX macro or primitive latexkeys const * in_word_set(docstring const & str); -/// tell the parser whether it should warn about unusual contents -void mathed_parser_warn_contents(bool); - /// parse formula from a string -bool mathed_parse_normal(MathAtom &, docstring const &); -/// ... the LyX lexxer -bool mathed_parse_normal(MathAtom &, Lexer &); +bool mathed_parse_normal(Buffer * buf, MathAtom &, docstring const &, + Parse::flags f = Parse::NORMAL); + +/// parse formula from the LyX lexxer +bool mathed_parse_normal(Buffer * buf, MathAtom &, Lexer &, + Parse::flags f = Parse::NORMAL); + /// parse formula from a string into a grid -void mathed_parse_normal(InsetMathGrid &, docstring const &); +bool mathed_parse_normal(InsetMathGrid &, docstring const &, + Parse::flags f = Parse::NORMAL); /// parse a single cell from a string -void mathed_parse_cell(MathData & ar, docstring const &); +bool mathed_parse_cell(MathData & ar, docstring const &, + Parse::flags f = Parse::NORMAL); + /// parse a single cell from a stream. Only use this for reading from .lyx /// file format, for the reason see Parser::tokenize(std::istream &). -void mathed_parse_cell(MathData & ar, std::istream &); +bool mathed_parse_cell(MathData & ar, std::istream &, + Parse::flags f = Parse::NORMAL); void initParser();