File: update_lexer.diff

package info (click to toggle)
sitemesh 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,792 kB
  • sloc: java: 6,708; xml: 551; jsp: 393; perl: 64; makefile: 11
file content (22 lines) | stat: -rw-r--r-- 1,026 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Compatibility with JFlex 1.6.x
Author: Miguel Landaeta <miguel@miguel.cc>
Forwarded: no
--- a/src/java/com/opensymphony/module/sitemesh/html/tokenizer/lexer.flex
+++ b/src/java/com/opensymphony/module/sitemesh/html/tokenizer/lexer.flex
@@ -21,15 +21,13 @@
 //%line
 //%column
 
-// Profiling showed that this mode was slightly faster than %pack or %table.
-%switch
 // Profiling showed this as an optimal size buffer that was often filled but rarely exceeded.
 %buffer 2048
 
 %{
     // Additional methods to add to generated Lexer to aid in error reporting.
     protected int position() { return yychar; }
-    protected int length()   { return yy_markedPos - yy_startRead; }
+    protected int length()   { return zzMarkedPos - zzStartRead; }
     protected int line()     { return -1; /*yyline;*/ }   // useful for debugging, but adds overhead
     protected int column()   { return -1; /*yycolumn;*/ } // useful for debugging, but adds overhead
     protected void resetLexerState() { yybegin(YYINITIAL); }