Author: blafond
Date: 2009-11-25 08:29:54 -0500 (Wed, 25 Nov 2009)
New Revision: 1347
Modified:
branches/ddl_sequencer/dna-cnd/src/main/java/org/jboss/dna/cnd/CndTokenizer.java
Log:
DNA-555 fix for changes in Position class which now tracks index in content. Positions
created in tokenize() method now setting index.
Modified:
branches/ddl_sequencer/dna-cnd/src/main/java/org/jboss/dna/cnd/CndTokenizer.java
===================================================================
---
branches/ddl_sequencer/dna-cnd/src/main/java/org/jboss/dna/cnd/CndTokenizer.java 2009-11-25
13:15:06 UTC (rev 1346)
+++
branches/ddl_sequencer/dna-cnd/src/main/java/org/jboss/dna/cnd/CndTokenizer.java 2009-11-25
13:29:54 UTC (rev 1347)
@@ -82,7 +82,7 @@
case '(':
case ')':
case ',':
- tokens.addToken(input.position(), input.index(), input.index() + 1,
SYMBOL);
+ tokens.addToken(input.position(input.index()), input.index(),
input.index() + 1, SYMBOL);
break;
// case '.':
// tokens.addToken(input.position(), input.index(), input.index() + 1,
DECIMAL);
@@ -90,7 +90,7 @@
case '{':
// Vendor extension, meant to be excluded
int startIndex = input.index();
- Position startingPosition = input.position();
+ Position startingPosition = input.position(startIndex);
boolean foundClosingBrace = false;
String vendorName = "";
while (input.hasNext()) {
@@ -114,7 +114,7 @@
break;
case '\"':
startIndex = input.index();
- startingPosition = input.position();
+ startingPosition = input.position(startIndex);
boolean foundClosingQuote = false;
while (input.hasNext()) {
c = input.next();
@@ -135,7 +135,7 @@
break;
case '\'':
startIndex = input.index();
- startingPosition = input.position();
+ startingPosition = input.position(startIndex);
foundClosingQuote = false;
while (input.hasNext()) {
c = input.next();
@@ -156,7 +156,7 @@
break;
case '/':
startIndex = input.index();
- startingPosition = input.position();
+ startingPosition = input.position(startIndex);
if (input.isNext('/')) {
// End-of-line comment ...
boolean foundLineTerminator = false;
@@ -211,7 +211,7 @@
// since these do not appear in other rules above, they will result
in one-character tokens.
//
startIndex = input.index();
- startingPosition = input.position();
+ startingPosition = input.position(startIndex);
// Read as long as there is a valid XML character ...
while (input.hasNext() && !(input.isNextWhitespace() ||
input.isNextAnyOf("[]<>=-+(),\"'/{*|"))) {
c = input.next();
Show replies by date