mcst-linux-kernel/patches-2024.06.26/antlr-2.7.7/0001-Replace-EOF.patch

29 lines
625 B
Diff

Link:
Subject: Use "-1" instead of EOF
Tags: common
--- a/lib/cpp/antlr/CharScanner.hpp 2020-09-18 20:38:46.336413892 +0300
+++ b/lib/cpp/antlr/CharScanner.hpp 2020-09-18 20:43:02.487211765 +0300
@@ -24,6 +24,8 @@
# include <stdio.h>
#endif
+#include <string.h>
+
#include <antlr/TokenStream.hpp>
#include <antlr/RecognitionException.hpp>
#include <antlr/SemanticException.hpp>
@@ -471,10 +473,10 @@
virtual void traceOut(const char* rname);
#ifndef NO_STATIC_CONSTS
- static const int EOF_CHAR = EOF;
+ static const int EOF_CHAR = -1;
#else
enum {
- EOF_CHAR = EOF
+ EOF_CHAR = -1
};
#endif
protected: