Java Doc for Expression.java in  » Scripting » jacl » tcl » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » jacl » tcl.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   tcl.lang.Expression

Expression
class Expression (Code)
This class handles Tcl expressions.


Field Summary
final static  intAND
    
final static  intBIT_AND
    
final static  intBIT_NOT
    
final static  intBIT_OR
    
final static  intBIT_XOR
    
final static  intCLOSE_PAREN
    
final static  intCOLON
    
final static  intCOMMA
    
final static  intDIVIDE
    
final static  intEND
    
final static  intEQUAL
    
final static  intGEQ
    
final static  intGREATER
    
final static  intLEFT_SHIFT
    
final static  intLEQ
    
final static  intLESS
    
final static  intMINUS
    
final static  intMOD
    
final static  intMULT
    
final static  intNEQ
    
final static  intNOT
    
final static  intOPEN_PAREN
    
final static  intOR
    
final static  intPLUS
    
final static  intQUESTY
    
final static  intRIGHT_SHIFT
    
final static  intSTREQ
    
final static  intSTRNEQ
    
final static  intUNARY_MINUS
    
final static  intUNARY_PLUS
    
final static  intUNKNOWN
    
final static  intVALUE
    
 intm_token
     Type of the last token to be parsed from the expression.
 HashMapmathFuncTable
    
static  StringoperatorStrings
    
static  intprecTable
    

Constructor Summary
 Expression()
     Constructor.

Method Summary
static  voidDivideByZero(Interp interp)
    
static  voidDomainError(Interp interp)
    
static  voidDoubleTooLarge(Interp interp)
    
static  voidDoubleTooSmall(Interp interp)
    
static  voidEmptyStringOperandError(Interp interp, int operator)
    
static  voidExprParseObject(Interp interp, TclObject obj, ExprValue value)
     Given a TclObject, such as the result of a command or variable evaluation, fill in a ExprValue with the parsed result.
static  voidExprParseString(Interp interp, TclObject obj, ExprValue value)
     TclParseNumber -> ExprParseString Given a TclObject that contains a String to be parsed (from a command or variable subst), fill in an ExprValue based on the string's numeric value.
static  voidIllegalType(Interp interp, int badType, int operator)
    
static  voidIntegerTooLarge(Interp interp)
    
 voidSyntaxError(Interp interp)
    
static  voidcheckDoubleRange(Interp interp, double d)
    
static  voidcheckIntegerRange(Interp interp, double d)
    
static  voidevalBinaryOperator(Interp interp, int operator, ExprValue value, ExprValue value2)
    
 booleanevalBoolean(Interp interp, String string)
     Evaluate an Tcl expression.
Parameters:
  interp - the context in which to evaluate the expression.
Parameters:
  string - expression to evaluate.
exception:
  TclException - for malformed expressions.
 voidevalMathFunction(Interp interp, String funcName, ExprValue[] values, boolean releaseValues, ExprValue result)
     This procedure will lookup and invoke a math function given the name of the function and an array of ExprValue arguments.
 voidevalMathFunction(Interp interp, String funcName, MathFunction mathFunc, ExprValue[] values, boolean releaseValues, ExprValue result)
     This procedure implements a math function invocation.
 voidevalSetResult(Interp interp, String string)
     Evaluate a Tcl expression and set the interp result to the value.
Parameters:
  interp - the context in which to evaluate the expression.
Parameters:
  string - expression to evaluate.
static  voidevalUnaryOperator(Interp interp, int operator, ExprValue value)
    
static  StringgetBooleanToken(String tok)
    
final  ExprValuegrabExprValue()
    
static  booleanlooksLikeInt(String s, int len, int i, boolean whole)
     This procedure decides whether the leading characters of a string look like an integer or something else (such as a floating-point number or string).
 ExprValuemathFunction(Interp interp)
     Parses a math function from an expression string, carry out the function, and return the value computed.
Parameters:
  interp - current interpreter.
 voidregisterMathFunction(String name, MathFunction mathFunc)
     This procedure will register a math function by adding it to the table of available math functions.
final  voidreleaseExprValue(ExprValue val)
    

Field Detail
AND
final static int AND(Code)



BIT_AND
final static int BIT_AND(Code)



BIT_NOT
final static int BIT_NOT(Code)



BIT_OR
final static int BIT_OR(Code)



BIT_XOR
final static int BIT_XOR(Code)



CLOSE_PAREN
final static int CLOSE_PAREN(Code)



COLON
final static int COLON(Code)



COMMA
final static int COMMA(Code)



DIVIDE
final static int DIVIDE(Code)



END
final static int END(Code)



EQUAL
final static int EQUAL(Code)



GEQ
final static int GEQ(Code)



GREATER
final static int GREATER(Code)



LEFT_SHIFT
final static int LEFT_SHIFT(Code)



LEQ
final static int LEQ(Code)



LESS
final static int LESS(Code)



MINUS
final static int MINUS(Code)



MOD
final static int MOD(Code)



MULT
final static int MULT(Code)



NEQ
final static int NEQ(Code)



NOT
final static int NOT(Code)



OPEN_PAREN
final static int OPEN_PAREN(Code)



OR
final static int OR(Code)



PLUS
final static int PLUS(Code)



QUESTY
final static int QUESTY(Code)



RIGHT_SHIFT
final static int RIGHT_SHIFT(Code)



STREQ
final static int STREQ(Code)



STRNEQ
final static int STRNEQ(Code)



UNARY_MINUS
final static int UNARY_MINUS(Code)



UNARY_PLUS
final static int UNARY_PLUS(Code)



UNKNOWN
final static int UNKNOWN(Code)



VALUE
final static int VALUE(Code)



m_token
int m_token(Code)
Type of the last token to be parsed from the expression. Corresponds to the characters just before expr.



mathFuncTable
HashMap mathFuncTable(Code)



operatorStrings
static String operatorStrings(Code)



precTable
static int precTable(Code)




Constructor Detail
Expression
Expression()(Code)
Constructor.




Method Detail
DivideByZero
static void DivideByZero(Interp interp) throws TclException(Code)



DomainError
static void DomainError(Interp interp) throws TclException(Code)



DoubleTooLarge
static void DoubleTooLarge(Interp interp) throws TclException(Code)



DoubleTooSmall
static void DoubleTooSmall(Interp interp) throws TclException(Code)



EmptyStringOperandError
static void EmptyStringOperandError(Interp interp, int operator) throws TclException(Code)



ExprParseObject
static void ExprParseObject(Interp interp, TclObject obj, ExprValue value) throws TclException(Code)
Given a TclObject, such as the result of a command or variable evaluation, fill in a ExprValue with the parsed result. If the TclObject already has an internal rep that is a numeric type, then no need to parse from the string rep. If the string rep is parsed into a numeric type, then update the internal rep of the object to the parsed value.



ExprParseString
static void ExprParseString(Interp interp, TclObject obj, ExprValue value)(Code)
TclParseNumber -> ExprParseString Given a TclObject that contains a String to be parsed (from a command or variable subst), fill in an ExprValue based on the string's numeric value. The value may be a floating-point, an integer, or a string. If the string value is converted to a numeric value, then update the internal rep of the TclObject.
Parameters:
  interp - the context in which to evaluate the expression.
Parameters:
  obj - the TclObject containing the string to parse.
Parameters:
  value - the ExprValue object to save the parsed value in.



IllegalType
static void IllegalType(Interp interp, int badType, int operator) throws TclException(Code)



IntegerTooLarge
static void IntegerTooLarge(Interp interp) throws TclException(Code)



SyntaxError
void SyntaxError(Interp interp) throws TclException(Code)



checkDoubleRange
static void checkDoubleRange(Interp interp, double d) throws TclException(Code)



checkIntegerRange
static void checkIntegerRange(Interp interp, double d) throws TclException(Code)



evalBinaryOperator
static void evalBinaryOperator(Interp interp, int operator, ExprValue value, ExprValue value2) throws TclException(Code)



evalBoolean
boolean evalBoolean(Interp interp, String string) throws TclException(Code)
Evaluate an Tcl expression.
Parameters:
  interp - the context in which to evaluate the expression.
Parameters:
  string - expression to evaluate.
exception:
  TclException - for malformed expressions. the value of the expression in boolean.



evalMathFunction
void evalMathFunction(Interp interp, String funcName, ExprValue[] values, boolean releaseValues, ExprValue result) throws TclException(Code)
This procedure will lookup and invoke a math function given the name of the function and an array of ExprValue arguments. Each ExprValue is released before the function exits. This method is intended to be used by other modules that may need to invoke a math function at runtime. It is assumed that the caller has checked the number of arguments, the type of the arguments will be adjusted before invocation if needed. The values argument can be null when there are no args to pass. The releaseValues argument should be true when the ExprValue objecys in the array should be released.



evalMathFunction
void evalMathFunction(Interp interp, String funcName, MathFunction mathFunc, ExprValue[] values, boolean releaseValues, ExprValue result) throws TclException(Code)
This procedure implements a math function invocation. See the comments for the function above, note that this method is used when the math function pointer has already been resolved. The values argument can be null when there are no args to pass. The releaseValues argument should be true when the ExprValue objecys in the array should be released.



evalSetResult
void evalSetResult(Interp interp, String string) throws TclException(Code)
Evaluate a Tcl expression and set the interp result to the value.
Parameters:
  interp - the context in which to evaluate the expression.
Parameters:
  string - expression to evaluate. the value of the expression.
exception:
  TclException - for malformed expressions.



evalUnaryOperator
static void evalUnaryOperator(Interp interp, int operator, ExprValue value) throws TclException(Code)



getBooleanToken
static String getBooleanToken(String tok)(Code)



grabExprValue
final ExprValue grabExprValue()(Code)



looksLikeInt
static boolean looksLikeInt(String s, int len, int i, boolean whole)(Code)
This procedure decides whether the leading characters of a string look like an integer or something else (such as a floating-point number or string). If the whole flag is true then the entire string must look like an integer. a boolean value indicating if the string looks like an integer.



mathFunction
ExprValue mathFunction(Interp interp) throws TclException(Code)
Parses a math function from an expression string, carry out the function, and return the value computed.
Parameters:
  interp - current interpreter. the value computed by the math function.
exception:
  TclException - if any error happens.



registerMathFunction
void registerMathFunction(String name, MathFunction mathFunc)(Code)
This procedure will register a math function by adding it to the table of available math functions. This methods is used when regression testing the expr command.



releaseExprValue
final void releaseExprValue(ExprValue val)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.