Class TokenToExpression

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class TokenToExpression
    extends Converter
    This actor reads a token from the input port and outputs a string token whose value is an expression that can be parsed to yield the input token. For example, if the input is itself a string token, the output will be a new string token whose value is the value of the input string token surrounded by double quotation marks. The input data type is undeclared, so this actor can accept any input. If the input known to be absent, this actor outputs a string "absent".

    This actor accepts any type of data on its input port, therefore it doesn't declare a type, but lets the type resolution algorithm find the least fixed point. If backward type inference is enabled, and no input type has been declared, the input is constrained to be equal to BaseType.GENERAL. This will result in upstream ports resolving to the most general type rather than the most specific.

    Since:
    Ptolemy II 2.1
    Version:
    $Id$
    Author:
    Steve Neuendorffer, Haiyang Zheng
    Pt.AcceptedRating:
    Red (liuj)
    Pt.ProposedRating:
    Yellow (neuendor)