29 #include "lshParser.h"
32 #define ERROR_PARAMS 2
34 extern bool inline_param;
35 extern int yyerror(
const char *s);
38 class errorException :
39 public std::exception {
41 errorException (
string msg =
"",
string dev =
"",
int code = 0,
int exit = 0): code_(code), msg_ (msg), exit_ (exit), dev_ (dev) {}
42 const char* what()
const throw() {
43 return "Break fuera de bloque.";
45 ~errorException () throw() {}
46 void error (
string file =
"",
int line = 0);
53 static void warning (
string file =
"",
int line = 0) {
57 file_txt =
"file " + file +
" ";
59 if (line && !inline_param) {
62 line_txt =
"line " + ss.str() +
" => ";
66 << file_txt << line_txt
67 << q_.front() << endl;
71 static void add (
string msg) {
74 static queue<string> q_;
Nodos de sentencias generales .