se.chalmers.cs.gf.parse
Class ParseDecimal

java.lang.Object
  extended by se.chalmers.cs.gf.parse.ParseDecimal
All Implemented Interfaces:
Parser

public class ParseDecimal
extends java.lang.Object
implements Parser

Parses a decimal number to the numerals abstract syntax.


Constructor Summary
ParseDecimal()
           
 
Method Summary
 java.lang.String getName()
          Get the name of this parser.
 java.util.Collection<Tree> parse(java.lang.String s)
          Parse a string to zero or more abstract syntax trees the parsers default category.
 java.util.Collection<Tree> parse(java.lang.String s, java.lang.String cat)
          Parse a string to zero or more abstract syntax trees in the given category.
 boolean tryThisOne()
          Whether this parser should be used when trying to parse a string with different parsers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseDecimal

public ParseDecimal()
Method Detail

parse

public java.util.Collection<Tree> parse(java.lang.String s)
Description copied from interface: Parser
Parse a string to zero or more abstract syntax trees the parsers default category.

Specified by:
parse in interface Parser

parse

public java.util.Collection<Tree> parse(java.lang.String s,
                                        java.lang.String cat)
Description copied from interface: Parser
Parse a string to zero or more abstract syntax trees in the given category.

Specified by:
parse in interface Parser
cat - The category to parse in. Note that the category name given here might not be identical to the one in the GF grammar, as the conversion to a context-free grammar can change the category name. Typically, for non-dependent categories, the GF source category "C" is translated to "C{}.s".

getName

public java.lang.String getName()
Description copied from interface: Parser
Get the name of this parser.

Specified by:
getName in interface Parser

tryThisOne

public boolean tryThisOne()
Description copied from interface: Parser
Whether this parser should be used when trying to parse a string with different parsers. This can be used to exclude special parsers from such attempts.

Specified by:
tryThisOne in interface Parser