corelib.tools.languages.parsers.javascript
Class JavascriptStreamTokenizer

java.lang.Object
  extended by corelib.tools.languages.parsers.javascript.JavascriptStreamTokenizer
All Implemented Interfaces:
LangageStreamTokenizer

public class JavascriptStreamTokenizer
extends java.lang.Object
implements LangageStreamTokenizer

This class parse a Javascript file and extract one per one each token (syntaxic element).

Since:
0.3.0
Author:
Alexia Ramaļoli & Dominique Liard

Constructor Summary
JavascriptStreamTokenizer(java.io.File theFile)
          Class constructor.
 
Method Summary
protected  void finalize()
           
 Token nextToken()
          Extracts and returns the next token of the file.
 void setIgnoreWhiteSpaces(boolean ignore)
           
 void unreadToken(Token token)
          Cancel the previous token extraction.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavascriptStreamTokenizer

public JavascriptStreamTokenizer(java.io.File theFile)
                          throws java.io.IOException
Class constructor.

Parameters:
theFile - The file to parse
Throws:
java.io.IOException - Thrown if the file cannot be accessed.
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

setIgnoreWhiteSpaces

public void setIgnoreWhiteSpaces(boolean ignore)
Specified by:
setIgnoreWhiteSpaces in interface LangageStreamTokenizer

unreadToken

public void unreadToken(Token token)
Cancel the previous token extraction.

Specified by:
unreadToken in interface LangageStreamTokenizer
Parameters:
token - The previouly read token to replace in the tokenizer.

nextToken

public Token nextToken()
Extracts and returns the next token of the file.

Specified by:
nextToken in interface LangageStreamTokenizer
Returns:
The next token of the file.


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.