1 /* 2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET 4 * 5 * Copyright (C) 2012 - 2016 - Scilab Enterprises 6 * 7 * This file is hereby licensed under the terms of the GNU GPL v2.0, 8 * pursuant to article 5.3.4 of the CeCILL v.2.1. 9 * This file was originally licensed under the terms of the CeCILL v2.1, 10 * and continues to be available under such terms. 11 * For more information, see the COPYING file which you should have received 12 * along with this program. 13 * 14 */ 15 16 /** 17 ** \file parse.hh 18 ** Declaration shared between the scanner and the parser but private 19 ** to the parse module. 20 */ 21 22 #ifndef PARSE_HH_ 23 #define PARSE_HH_ 24 25 #include <string> 26 #include <iostream> 27 #include <errno.h> 28 #include "exit_status.hxx" 29 #include "all.hxx" 30 31 32 typedef struct __EXPRESSIONLINEBREAK__ 33 { 34 bool bVerbose; 35 int iNbBreaker; 36 } LineBreakStr; 37 38 39 /** 40 define YYLTYPE to override Bison Default Location 41 */ 42 #define YYLTYPE Location 43 #include "parsescilab.hxx" 44 45 /** \brief Parsing entry . */ 46 //int yylex(YYSTYPE *yylval, YYLTYPE *yylloc); 47 int yylex(void); 48 49 /** \brief Parsing error . */ 50 void yyerror(std::string msg); 51 52 53 /** \brief FIXME . */ 54 int scan_throw(int); 55 56 int get_last_token(); 57 58 /** \brief For scanner just step . */ 59 void scan_step(void); 60 61 /** \brief Error from the scanner (from scanscilab) . */ 62 void scan_error(std::string msg); 63 64 /** \brief Open the scanner step (from scanscilab) . */ 65 void scan_open(const std::string &name); 66 67 /** \brief Close the scanner step (from scanscilab) . */ 68 void scan_close(void); 69 70 /** \brief Convert exponent numbers to C standard . */ 71 void scan_exponent_convert(char *in); 72 73 /** \brief Parse/Scan error message displat . */ 74 void PrintError(std::string msg); 75 76 #endif /* !PARSE_HH_ */ 77