summaryrefslogtreecommitdiff
path: root/Lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'Lexer.l')
-rw-r--r--Lexer.l7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lexer.l b/Lexer.l
index 66a3e37..531878d 100644
--- a/Lexer.l
+++ b/Lexer.l
@@ -24,7 +24,7 @@ namespace pcc {
%option never-interactive
%option nounistd
%option case-insensitive
-%option noyywrap nounput noinput batch debug
+%option noyywrap nounput noinput batch
decimal ([1-9][0-9]*)|0
octal 0[0-7]*
@@ -158,9 +158,12 @@ white [\t\f\r ]
namespace pcc {
int Driver::StartLexer(std::string& filename) {
+ if(CurrentLogLevel==LogLevel::PCC_DEBUG){
+ yy_flex_debug = 1;
+ }
yyin = std::fopen(filename.c_str(), "r");
if (yyin == NULL) {
- Log(PCC_ERROR, "Failed to open file %s", filename.c_str());
+ Log(LogLevel::PCC_ERROR, "Failed to open file %s", filename.c_str());
return -1;
}
return 0;