jade.content.lang.sl
Class SimpleSLTokenizer

java.lang.Object
  |
  +--jade.content.lang.sl.SimpleSLTokenizer

public class SimpleSLTokenizer
extends java.lang.Object

Simple utility class for hand-made SL parsing

Author:
Giovanni Caire - TILAB

Constructor Summary
SimpleSLTokenizer(java.lang.String s)
          Construct a SimpleSLTokenizer that will act on the given String
 
Method Summary
 void consumeChar(char c)
          Check that the next character (after eventual spaces) is 'c' and advance the pointer to the character just after
 java.lang.String getElement()
          Return the next SL element (i.e. a word or a generic sequence of char enclosed into "") and advance the pointer to the character just after.
 java.lang.String nextToken()
          Return the next SL token (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSLTokenizer

public SimpleSLTokenizer(java.lang.String s)
Construct a SimpleSLTokenizer that will act on the given String
Method Detail

nextToken

public java.lang.String nextToken()
                           throws Codec.CodecException
Return the next SL token (i.e. '(', ')' or a generic element) without advancing the pointer

consumeChar

public void consumeChar(char c)
                 throws Codec.CodecException
Check that the next character (after eventual spaces) is 'c' and advance the pointer to the character just after

getElement

public java.lang.String getElement()
                            throws Codec.CodecException
Return the next SL element (i.e. a word or a generic sequence of char enclosed into "") and advance the pointer to the character just after.