Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornsandonato2010-10-29 21:36:54 +0000
committernsandonato2010-10-29 21:36:54 +0000
commitc5f828ed8c87d45d5586972047790f5a70f348da (patch)
tree417845c9f0efc109d0bce9092b6450d226f37abc /bundles/org.eclipse.jst.jsp.core
parent0a2eae98461e80ce4f39c54a5b23d3256b20d44a (diff)
downloadwebtools.sourceediting-c5f828ed8c87d45d5586972047790f5a70f348da.tar.gz
webtools.sourceediting-c5f828ed8c87d45d5586972047790f5a70f348da.tar.xz
webtools.sourceediting-c5f828ed8c87d45d5586972047790f5a70f348da.zip
[329094] Cleanup unread fields/variables that are only incremented/decremented
Diffstat (limited to 'bundles/org.eclipse.jst.jsp.core')
-rw-r--r--bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex9
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java35
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java64
3 files changed, 17 insertions, 91 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
index 6daf75a833..612d437d2a 100644
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
+++ b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,7 +30,6 @@ import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
%function primGetNextToken
%type String
%char
-%line
%unicode
%caseless
%pack
@@ -244,7 +243,7 @@ import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
zzEndRead = 0;
/** number of newlines encountered up to the start of the matched text */
- yyline = 0;
+ //yyline = 0;
/** the number of characters up to the start of the matched text */
yychar = 0;
@@ -253,12 +252,12 @@ import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
* the number of characters from the last newline up to the start of the
* matched text
*/
- yycolumn = 0;
+ //yycolumn = 0;
/**
* yy_atBOL == true <=> the scanner is currently at the beginning of a line
*/
- zzAtBOL = false;
+ //zzAtBOL = false;
/** yy_atEOF == true <=> the scanner has returned a value for EOF */
zzAtEOF = false;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java
index 0b27830ca9..6a3abb9f25 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java
@@ -1,4 +1,4 @@
-/* The following code was generated by JFlex 1.2.2 on 6/29/10 1:04 PM */
+/* The following code was generated by JFlex 1.2.2 on 10/29/10 4:24 PM */
/*******************************************************************************
* Copyright (c) 2004, 2010 IBM Corporation and others.
@@ -36,8 +36,8 @@ import org.eclipse.wst.xml.core.internal.parser.IntStack;
/**
* This class is a scanner generated by
* <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2
- * on 6/29/10 1:04 PM from the specification file
- * <tt>file:/D:/dev/workspaces/wtp/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.jflex</tt>
+ * on 10/29/10 4:24 PM from the specification file
+ * <tt>file:/C:/dev/workspaces/indigo/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.jflex</tt>
*/
public class JSPTokenizer implements BlockTokenizer, DOMJSPRegionContexts {
@@ -951,7 +951,7 @@ public class JSPTokenizer implements BlockTokenizer, DOMJSPRegionContexts {
private int yy_endRead;
/** number of newlines encountered up to the start of the matched text */
- private int yyline;
+ // private int yyline;
/** the number of characters up to the start of the matched text */
private int yychar;
@@ -1746,7 +1746,7 @@ private final String doBlockTagScan() throws IOException {
yy_endRead = 0;
/* number of newlines encountered up to the start of the matched text */
- yyline = 0;
+ //yyline = 0;
/* the number of characters up to the start of the matched text */
yychar = 0;
@@ -2120,31 +2120,6 @@ protected final boolean containsTagName(String markerTagName) {
yychar+= yylength();
- boolean yy_counted = false;
- for (yy_currentPos = yy_startRead; yy_currentPos < yy_markedPos;
- yy_currentPos++) {
- switch (yy_buffer[yy_currentPos]) {
- case '\r':
- yyline++;
- yy_counted = true;
- break;
- case '\n':
- if (yy_counted)
- yy_counted = false;
- else {
- yyline++;
- }
- break;
- default:
- yy_counted = false;
- }
- }
-
- if (yy_counted) {
- if ( yy_advance() == '\n' ) yyline--;
- if ( !yy_atEOF ) yy_currentPos--;
- }
-
yy_action = -1;
yy_currentPos = yy_startRead = yy_markedPos;
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java
index ddb22e72d0..429e7422de 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java
@@ -1,7 +1,7 @@
-/* The following code was generated by JFlex 1.4.1 on 7/22/08 10:30 AM */
+/* The following code was generated by JFlex 1.4.1 on 10/29/10 4:57 PM */
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.1
- * on 7/22/08 10:30 AM from the specification file
- * <tt>D:/workspaces/wtp301/workspace/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex</tt>
+ * on 10/29/10 4:57 PM from the specification file
+ * <tt>C:/dev/workspaces/indigo/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex</tt>
*/
public class JSPedCSSTokenizer implements JSPedCSSRegionContexts, ICSSTokenizer {
@@ -1212,7 +1212,7 @@ public class JSPedCSSTokenizer implements JSPedCSSRegionContexts, ICSSTokenizer
private int zzEndRead;
/** number of newlines encountered up to the start of the matched text */
- private int yyline;
+ //private int yyline;
/** the number of characters up to the start of the matched text */
private int yychar;
@@ -1285,7 +1285,6 @@ public class JSPedCSSTokenizer implements JSPedCSSRegionContexts, ICSSTokenizer
if (context.equals(CSS_JSP_SCRIPTLET) && (yystate() == ST_JSP_DIRECTIVE || yystate() == ST_JSP_EXP || yystate() == ST_JSP_DECLARATION)){
context = nextTokenType;
}
-
nextTokenType = primGetNextToken();
if (nextTokenType == null){
break;
@@ -1441,7 +1440,7 @@ public class JSPedCSSTokenizer implements JSPedCSSRegionContexts, ICSSTokenizer
zzEndRead = 0;
/** number of newlines encountered up to the start of the matched text */
- yyline = 0;
+ //yyline = 0;
/** the number of characters up to the start of the matched text */
yychar = 0;
@@ -1587,11 +1586,11 @@ public class JSPedCSSTokenizer implements JSPedCSSRegionContexts, ICSSTokenizer
*/
public final void yyreset(java.io.Reader reader) {
zzReader = reader;
- // zzAtBOL = true;
+ //zzAtBOL = true;
zzAtEOF = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;
- yyline = yychar = 0;//yycolumn = 0;
+ yychar = 0;//yyline = yychar = 0;yycolumn = 0;
zzLexicalState = YYINITIAL;
}
@@ -1718,53 +1717,6 @@ public class JSPedCSSTokenizer implements JSPedCSSRegionContexts, ICSSTokenizer
yychar+= zzMarkedPosL-zzStartRead;
- boolean zzR = false;
- for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL;
- zzCurrentPosL++) {
- switch (zzBufferL[zzCurrentPosL]) {
- case '\u000B':
- case '\u000C':
- case '\u0085':
- case '\u2028':
- case '\u2029':
- yyline++;
- zzR = false;
- break;
- case '\r':
- yyline++;
- zzR = true;
- break;
- case '\n':
- if (zzR)
- zzR = false;
- else {
- yyline++;
- }
- break;
- default:
- zzR = false;
- }
- }
-
- if (zzR) {
- // peek one character ahead if it is \n (if we have counted one line too much)
- boolean zzPeek;
- if (zzMarkedPosL < zzEndReadL)
- zzPeek = zzBufferL[zzMarkedPosL] == '\n';
- else if (zzAtEOF)
- zzPeek = false;
- else {
- boolean eof = zzRefill();
- zzEndReadL = zzEndRead;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- if (eof)
- zzPeek = false;
- else
- zzPeek = zzBufferL[zzMarkedPosL] == '\n';
- }
- if (zzPeek) yyline--;
- }
zzAction = -1;
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;

Back to the top