@@ -17,7 +17,6 @@ public class Tokenizer extends StreamTokenizer
1717 private final Reader theReader ;
1818 private final String source ;
1919
20- private int prevLineNo ;
2120 private int lineNumberAdd ;
2221 private boolean autoPop ;
2322
@@ -52,7 +51,6 @@ public Tokenizer(Reader reader, String source)
5251 this .theReader = reader ;
5352 this .source = source ;
5453
55- this .prevLineNo = 0 ;
5654 this .lineNumberAdd = 0 ;
5755 this .autoPop = true ;
5856 }
@@ -75,15 +73,6 @@ public String getSource()
7573 return this .source ;
7674 }
7775
78- /**
79- * Gets the line number that a token was read from previously.
80- * @return the line number that a token was read from previously
81- */
82- public int linenoprev ()
83- {
84- return this .prevLineNo ;
85- }
86-
8776 /**
8877 * Returns the current line number.
8978 * @return the current line number
@@ -226,7 +215,7 @@ public String readUntil(String match)
226215 * Gets the next token.
227216 * @return <code>true</code> if there was another token
228217 */
229- public boolean tokenNext () throws NslExpectedException , NslException
218+ public boolean tokenNext ()
230219 {
231220 return this .tokenNext (null );
232221 }
@@ -236,9 +225,8 @@ public boolean tokenNext() throws NslExpectedException, NslException
236225 * @param expected the message of the exception to throw if no token exists
237226 * @return <code>true</code> if there was another token
238227 */
239- public boolean tokenNext (String expected ) throws NslExpectedException , NslException
228+ public boolean tokenNext (String expected )
240229 {
241- this .prevLineNo = lineno ();
242230 try
243231 {
244232 boolean result = this .nextToken () != TT_EOF ;
@@ -310,7 +298,7 @@ public boolean tokenNext(String expected) throws NslExpectedException, NslExcept
310298 * Returns the current token as a string.
311299 * @return the current token as a string
312300 */
313- public String tokenToString ()
301+ /* public String tokenToString()
314302 {
315303 if (this.tokenIsWord())
316304 return this.sval;
@@ -319,13 +307,13 @@ public String tokenToString()
319307 if (this.tokenIsString())
320308 return '"' + this.sval + '"';
321309 return Character.toString((char)this.ttype);
322- }
310+ }*/
323311
324312 /**
325313 * Matches the given character and prints an error otherwise.
326314 * @param c the character to match
327315 */
328- public void matchOrDie (char c ) throws NslExpectedException , NslException
316+ public void matchOrDie (char c )
329317 {
330318 if (!this .tokenIs (c ))
331319 throw new NslExpectedException ("\" " + c + "\" " );
@@ -336,7 +324,7 @@ public void matchOrDie(char c) throws NslExpectedException, NslException
336324 * Matches the given word and prints an error otherwise.
337325 * @param word the word to match
338326 */
339- public void matchOrDie (String word ) throws NslExpectedException , NslException
327+ public void matchOrDie (String word )
340328 {
341329 if (!this .tokenIs (word ))
342330 throw new NslExpectedException ("\" " + word + "\" " );
@@ -348,7 +336,7 @@ public void matchOrDie(String word) throws NslExpectedException, NslException
348336 * @param c the character to match
349337 * @return <code>true</code> on success
350338 */
351- public boolean match (char c ) throws NslException
339+ public boolean match (char c )
352340 {
353341 if (this .tokenIs (c ))
354342 {
@@ -363,7 +351,7 @@ public boolean match(char c) throws NslException
363351 * @param word the word to match
364352 * @return <code>true</code> on success
365353 */
366- public boolean match (String word ) throws NslException
354+ public boolean match (String word )
367355 {
368356 if (this .tokenIs (word ))
369357 {
@@ -377,9 +365,9 @@ public boolean match(String word) throws NslException
377365 * Matches a semicolon on the end of the current line or prints an error
378366 * otherwise.
379367 */
380- public void matchEolOrDie () throws NslExpectedException , NslException
368+ public void matchEolOrDie ()
381369 {
382- if (!this .tokenIs (';' ) || this . lineno () != this . prevLineNo )
370+ if (!this .tokenIs (';' ))
383371 throw new NslExpectedException ("\" ;\" " );
384372 this .tokenNext ();
385373 }
@@ -389,7 +377,7 @@ public void matchEolOrDie() throws NslExpectedException, NslException
389377 * @return the word if the current token was a word, or <code>null</code>
390378 * otherwise
391379 */
392- public String matchAWord () throws NslException
380+ public String matchAWord ()
393381 {
394382 return this .matchAWord (null );
395383 }
@@ -400,7 +388,7 @@ public String matchAWord() throws NslException
400388 * @return the word if the current token was a word, or <code>null</code>
401389 * otherwise
402390 */
403- public String matchAWord (String expected ) throws NslException
391+ public String matchAWord (String expected )
404392 {
405393 if (this .tokenIsWord ())
406394 {
@@ -418,7 +406,7 @@ public String matchAWord(String expected) throws NslException
418406 * @return the string if the current token was a string, or <code>null</code>
419407 * otherwise
420408 */
421- public String matchAString () throws NslException
409+ public String matchAString ()
422410 {
423411 return this .matchAString (null );
424412 }
@@ -429,7 +417,7 @@ public String matchAString() throws NslException
429417 * @return the string if the current token was a string, or <code>null</code>
430418 * otherwise
431419 */
432- public String matchAString (String expected ) throws NslException
420+ public String matchAString (String expected )
433421 {
434422 if (this .tokenIsString ())
435423 {
0 commit comments