Enable building of qlalr with QT_NO_CAST_FROM/TO_ASCII
Change-Id: I1b26c4b3ca84e0bb8001ca24ef46bd24926a0f82 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
eeb03fbf26
commit
8f71182d15
@ -187,7 +187,7 @@ Grammar::Grammar ():
|
|||||||
|
|
||||||
tk_end = intern ("$end");
|
tk_end = intern ("$end");
|
||||||
terminals.insert (tk_end);
|
terminals.insert (tk_end);
|
||||||
spells.insert (tk_end, "end of file");
|
spells.insert (tk_end, QLatin1String("end of file"));
|
||||||
|
|
||||||
/*tk_error= terminals.insert (intern ("error"))*/;
|
/*tk_error= terminals.insert (intern ("error"))*/;
|
||||||
}
|
}
|
||||||
|
@ -337,6 +337,7 @@ public:
|
|||||||
Grammar ();
|
Grammar ();
|
||||||
|
|
||||||
Name intern (const QString &id);
|
Name intern (const QString &id);
|
||||||
|
Name intern (const char *id) { return intern(QString::fromUtf8(id)); }
|
||||||
|
|
||||||
inline bool isTerminal (Name name) const
|
inline bool isTerminal (Name name) const
|
||||||
{ return terminals.find (name) != terminals.end (); }
|
{ return terminals.find (name) != terminals.end (); }
|
||||||
|
@ -65,7 +65,7 @@ int main (int argc, char *argv[])
|
|||||||
bool no_lines = false;
|
bool no_lines = false;
|
||||||
bool debug_info = true;
|
bool debug_info = true;
|
||||||
bool qt_copyright = false;
|
bool qt_copyright = false;
|
||||||
QString file_name = 0;
|
QString file_name;
|
||||||
|
|
||||||
const QStringList args = app.arguments().mid(1);
|
const QStringList args = app.arguments().mid(1);
|
||||||
for (const QString &arg : args) {
|
for (const QString &arg : args) {
|
||||||
|
@ -178,7 +178,8 @@ int Recognizer::nextToken()
|
|||||||
|
|
||||||
text.clear ();
|
text.clear ();
|
||||||
if (! _M_no_lines)
|
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(" \"") + _M_input_file + QLatin1String("\"\n");
|
||||||
inp (); // skip ':'
|
inp (); // skip ':'
|
||||||
|
|
||||||
forever
|
forever
|
||||||
@ -215,7 +216,8 @@ int Recognizer::nextToken()
|
|||||||
|
|
||||||
text.clear ();
|
text.clear ();
|
||||||
if (! _M_no_lines)
|
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(" \"") + _M_input_file + QLatin1String("\"\n");
|
||||||
|
|
||||||
inp (); // skip ':'
|
inp (); // skip ':'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user