summaryrefslogtreecommitdiff
path: root/Lexer.l
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-27 02:42:01 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-27 02:42:01 +0800
commitc84e212d0de5ff9f14ab14ac5143e56d2839ac82 (patch)
treef511bc44b251d5dac2a7ab87b687e8d00b3dc07c /Lexer.l
parentba1e3fdd1eea618a38e56918912dc966d1e399a8 (diff)
fix the rr-conflicts
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;