diff options
Diffstat (limited to 'src/tools/qlalr/lalr.g')
-rw-r--r-- | src/tools/qlalr/lalr.g | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/tools/qlalr/lalr.g b/src/tools/qlalr/lalr.g index 65a63f8312..5e335c5a3b 100644 --- a/src/tools/qlalr/lalr.g +++ b/src/tools/qlalr/lalr.g @@ -61,8 +61,7 @@ %start Specification -/: -/**************************************************************************** +/:/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ @@ -163,8 +162,7 @@ protected: }; :/ -/. -/**************************************************************************** +/./**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ @@ -194,6 +192,8 @@ protected: #include "recognizer.h" +#include <QtCore/qdir.h> + #include <cstdlib> #include <cstring> #include <cctype> @@ -344,7 +344,8 @@ int Recognizer::nextToken() text.clear (); if (! _M_no_lines) - text += QLatin1String ("\n#line ") + QString::number (_M_action_line) + " \"" + _M_input_file + "\"\n"; + text += QLatin1String("\n#line ") + QString::number(_M_action_line) + + QLatin1String(" \"") + QDir::fromNativeSeparators(_M_input_file) + QLatin1String("\"\n"); inp (); // skip ':' forever @@ -381,7 +382,8 @@ int Recognizer::nextToken() text.clear (); if (! _M_no_lines) - text += QLatin1String ("\n#line ") + QString::number (_M_action_line) + " \"" + _M_input_file + "\"\n"; + text += QLatin1String("\n#line ") + QString::number(_M_action_line) + + QLatin1String(" \"") + QDir::fromNativeSeparators(_M_input_file) + QLatin1String("\"\n"); inp (); // skip ':' |