1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
From 1cd1f4914ff3b63d45444713702893962942d2e0 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Sat, 18 Jan 2014 16:21:16 +0000
Subject: Rename assert, which clashed with Java 1.4
Bug-Debian: http://bugs.debian.org/261949
Forwarded: no
Last-Update: 2010-03-02
Patch-Name: rename-assert.patch
---
sample.lex | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sample.lex b/sample.lex
index fb4940d..525be18 100644
--- a/sample.lex
+++ b/sample.lex
@@ -10,7 +10,7 @@ class Sample {
}
class Utility {
- public static void assert
+ public static void ASSERT
(
boolean expr
)
@@ -120,7 +120,7 @@ COMMENT_TEXT=([^/*\n]|[^*\n]"/"[^*\n]|[^/\n]"*"[^/\n]|"*"[^/\n]|"/"[^*\n])*
<COMMENT> "/*" { comment_count = comment_count + 1; }
<COMMENT> "*/" {
comment_count = comment_count - 1;
- Utility.assert(comment_count >= 0);
+ Utility.ASSERT(comment_count >= 0);
if (comment_count == 0) {
yybegin(YYINITIAL);
}
@@ -130,14 +130,14 @@ COMMENT_TEXT=([^/*\n]|[^*\n]"/"[^*\n]|[^/\n]"*"[^/\n]|"*"[^/\n]|"/"[^*\n])*
<YYINITIAL> \"{STRING_TEXT}\" {
String str = yytext().substring(1,yytext().length() - 1);
- Utility.assert(str.length() == yytext().length() - 2);
+ Utility.ASSERT(str.length() == yytext().length() - 2);
return (new Yytoken(40,str,yyline,yychar,yychar + str.length()));
}
<YYINITIAL> \"{STRING_TEXT} {
String str = yytext().substring(1,yytext().length());
Utility.error(Utility.E_UNCLOSEDSTR);
- Utility.assert(str.length() == yytext().length() - 1);
+ Utility.ASSERT(str.length() == yytext().length() - 1);
return (new Yytoken(41,str,yyline,yychar,yychar + str.length()));
}
<YYINITIAL> {DIGIT}+ {
|