org.apache.commons.configuration.plist
Class PropertyListParser

java.lang.Object
  extended byorg.apache.commons.configuration.plist.PropertyListParser
All Implemented Interfaces:
PropertyListParserConstants

class PropertyListParser
extends Object
implements PropertyListParserConstants

JavaCC based parser for the PropertyList format.

Version:
$Revision: 348244 $, $Date: 2005-11-22 21:40:57 +0100 (Di, 22 Nov 2005) $
Author:
Emmanuel Bourg

Field Summary
static int ARRAY_BEGIN
           
static int ARRAY_END
           
static int ARRAY_SEPARATOR
           
static int DATA
           
static int DATA_END
           
static int DATA_START
           
static int DEFAULT
           
static int DICT_BEGIN
           
static int DICT_END
           
static int DICT_SEPARATOR
           
static int EOF
           
static int EQUAL
           
static int ESCAPED_QUOTE
           
static int HEXA
           
(package private)  SimpleCharStream jj_input_stream
           
 Token jj_nt
           
static int LETTER
           
static int QUOTE
           
static int QUOTED_STRING
           
static int STRING
           
 Token token
           
 PropertyListParserTokenManager token_source
           
static String[] tokenImage
           
static int WHITE
           
 
Constructor Summary
PropertyListParser(InputStream stream)
           
PropertyListParser(Reader stream)
           
 
Method Summary
 List Array()
           
 byte[] Data()
           
 PropertyListConfiguration Dictionary()
           
 Object Element()
           
protected  byte[] filterData(String s)
          Remove the white spaces and the data delimiters from the specified string and parse it as a byte array.
 ParseException generateParseException()
           
 PropertyListConfiguration parse()
           
 HierarchicalConfiguration.Node Property()
           
protected  String removeQuotes(String s)
          Remove the quotes at the beginning and at the end of the specified String.
 String String()
           
protected  String unescapeQuotes(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public PropertyListParserTokenManager token_source

jj_input_stream

SimpleCharStream jj_input_stream

token

public Token token

jj_nt

public Token jj_nt

EOF

public static final int EOF
See Also:
Constant Field Values

ARRAY_BEGIN

public static final int ARRAY_BEGIN
See Also:
Constant Field Values

ARRAY_END

public static final int ARRAY_END
See Also:
Constant Field Values

ARRAY_SEPARATOR

public static final int ARRAY_SEPARATOR
See Also:
Constant Field Values

DICT_BEGIN

public static final int DICT_BEGIN
See Also:
Constant Field Values

DICT_END

public static final int DICT_END
See Also:
Constant Field Values

DICT_SEPARATOR

public static final int DICT_SEPARATOR
See Also:
Constant Field Values

EQUAL

public static final int EQUAL
See Also:
Constant Field Values

DATA_START

public static final int DATA_START
See Also:
Constant Field Values

DATA_END

public static final int DATA_END
See Also:
Constant Field Values

QUOTE

public static final int QUOTE
See Also:
Constant Field Values

LETTER

public static final int LETTER
See Also:
Constant Field Values

WHITE

public static final int WHITE
See Also:
Constant Field Values

HEXA

public static final int HEXA
See Also:
Constant Field Values

DATA

public static final int DATA
See Also:
Constant Field Values

STRING

public static final int STRING
See Also:
Constant Field Values

QUOTED_STRING

public static final int QUOTED_STRING
See Also:
Constant Field Values

ESCAPED_QUOTE

public static final int ESCAPED_QUOTE
See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
See Also:
Constant Field Values

tokenImage

public static final String[] tokenImage
Constructor Detail

PropertyListParser

public PropertyListParser(InputStream stream)

PropertyListParser

public PropertyListParser(Reader stream)
Method Detail

removeQuotes

protected String removeQuotes(String s)
Remove the quotes at the beginning and at the end of the specified String.


unescapeQuotes

protected String unescapeQuotes(String s)

filterData

protected byte[] filterData(String s)
                     throws ParseException
Remove the white spaces and the data delimiters from the specified string and parse it as a byte array.

Throws:
ParseException

parse

public final PropertyListConfiguration parse()
                                      throws ParseException
Throws:
ParseException

Dictionary

public final PropertyListConfiguration Dictionary()
                                           throws ParseException
Throws:
ParseException

Property

public final HierarchicalConfiguration.Node Property()
                                              throws ParseException
Throws:
ParseException

Element

public final Object Element()
                     throws ParseException
Throws:
ParseException

Array

public final List Array()
                 throws ParseException
Throws:
ParseException

String

public final String String()
                    throws ParseException
Throws:
ParseException

Data

public final byte[] Data()
                  throws ParseException
Throws:
ParseException

generateParseException

public ParseException generateParseException()


Copyright © 2001-2006 The Apache Software Foundation. All Rights Reserved.