Commit 16cbb3e7 authored by Colin Watson's avatar Colin Watson

* Rename assert to ASSERT in sample.lex too.

parent 77d9b042
......@@ -6,6 +6,7 @@ jlex (1.2.6-2) UNRELEASED; urgency=low
java2-runtime since nothing actually seems to provide that).
* Upgrade to debhelper compatibility level 4.
* Convert from menu/dwww to doc-base.
* Rename assert to ASSERT in sample.lex too.
-- Colin Watson <cjwatson@debian.org> Thu, 15 Dec 2005 11:05:55 +0000
......
......@@ -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}+ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment