Java Doc for Interpreter.java in  » Scripting » Nice » gnu » expr » 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 » Nice » gnu.expr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gnu.expr.Interpreter

All known Subclasses:   nice.tools.code.NiceInterpreter,
Interpreter
abstract public class Interpreter (Code)
Contains various language-dependent methods. Also contains "global" state about the executation environment, such as the global Environment. There can be multiple Interpreters associated with different threads, representing mutiple top-levels. (However, this functionality is incomplete.)


Field Summary
final public static  intFUNCTION_NAMESPACE
    
final public static  intVALUE_NAMESPACE
    
public static  InterpreterdefaultInterpreter
    
protected  Environmentenviron
    
final public static  BooleanfalseObject
    
static  String[][]languages
     List of known languages and their Interpreter classes.
final public static  Stringquasiquote_sym
    
final public static  Stringquote_sym
    
final public static  BooleantrueObject
    
final public static  UndefinedundefinedObject
    
final public static  Stringunquote_sym
    
final public static  Stringunquotesplicing_sym
    
final public static  ObjectvoidObject
    

Constructor Summary
protected  Interpreter()
    

Method Summary
public  TypeasType(Object spec)
     "Coerce" a language-specific "type specifier" object to a Type.
public  ObjectbooleanObject(boolean b)
    
public  ObjectcoerceFromObject(Class clas, Object obj)
    
public  ObjectcoerceToObject(Class clas, Object obj)
    
public  ObjectcoerceToObject(int val)
    
public  voiddefine(String sym, Object p)
    
public  voidemitCoerceToBoolean(CodeAttr code)
     Generate code to test if an object is considered true. Assume the object has been pushed on the JVM stack. Generate code to push true or false as appropriate.
public  voidemitPushBoolean(boolean value, CodeAttr code)
    
public  EnvironmentgetEnvironment()
    
abstract public  FormatToConsumergetFormat(boolean readable)
    
public static  InterpretergetInstance(String name)
     Look for an interpreter for a language with the given name or extension. If name is null, look for the first language available.
public static  InterpretergetInstance(String langName, Class langClass)
    
public static  InterpretergetInterpreter()
    
public static  String[][]getLanguages()
    
abstract public  LexergetLexer(InPort inp, gnu.text.SourceMessages messages)
    
abstract public  StringgetName()
    
public  intgetNamespaceOf(Declaration decl)
     Return the namespace (e.g value or function) of a Declaration.
public  EnvironmentgetNewEnvironment()
    
public  ConsumergetOutputConsumer(OutPort out)
    
public  ProceduregetPrompter()
    
abstract public  TypegetTypeFor(Class clas)
    
public  TypegetTypeFor(String name)
    
public  TypegetTypeFor(Expression exp)
    
public  booleanhasSeparateFunctionNamespace()
     True if functions are in a separate anme space from variable. Is true for e.g.
public  booleanisTrue(Object value)
     Test if a value is considered "true" in this language.
public  Objectlookup(String name)
    
public  ObjectnoValue()
     The value to return for a "void" result.
abstract public  ModuleExpparse(Environment env, Lexer lexer)
    
abstract public  ModuleExpparseFile(InPort port, gnu.text.SourceMessages messages)
    
public  voidprint(Object obj, OutPort out)
    
public  voidprint(Object value, OutPort out, boolean readable)
    
abstract public  Objectread(InPort in)
    
public  voidsetEnvironment(Environment environ)
    
public static  Typestring2Type(String name)
    

Field Detail
FUNCTION_NAMESPACE
final public static int FUNCTION_NAMESPACE(Code)



VALUE_NAMESPACE
final public static int VALUE_NAMESPACE(Code)



defaultInterpreter
public static Interpreter defaultInterpreter(Code)



environ
protected Environment environ(Code)



falseObject
final public static Boolean falseObject(Code)



languages
static String[][] languages(Code)
List of known languages and their Interpreter classes. Each element is one or more language names, or filename extensions, followed by the name of the Interpreter sub-class. The table is searched from the beginning.



quasiquote_sym
final public static String quasiquote_sym(Code)



quote_sym
final public static String quote_sym(Code)



trueObject
final public static Boolean trueObject(Code)



undefinedObject
final public static Undefined undefinedObject(Code)



unquote_sym
final public static String unquote_sym(Code)



unquotesplicing_sym
final public static String unquotesplicing_sym(Code)



voidObject
final public static Object voidObject(Code)




Constructor Detail
Interpreter
protected Interpreter()(Code)




Method Detail
asType
public Type asType(Object spec)(Code)
"Coerce" a language-specific "type specifier" object to a Type.



booleanObject
public Object booleanObject(boolean b)(Code)



coerceFromObject
public Object coerceFromObject(Class clas, Object obj)(Code)



coerceToObject
public Object coerceToObject(Class clas, Object obj)(Code)



coerceToObject
public Object coerceToObject(int val)(Code)



define
public void define(String sym, Object p)(Code)



emitCoerceToBoolean
public void emitCoerceToBoolean(CodeAttr code)(Code)
Generate code to test if an object is considered true. Assume the object has been pushed on the JVM stack. Generate code to push true or false as appropriate.



emitPushBoolean
public void emitPushBoolean(boolean value, CodeAttr code)(Code)



getEnvironment
public Environment getEnvironment()(Code)



getFormat
abstract public FormatToConsumer getFormat(boolean readable)(Code)



getInstance
public static Interpreter getInstance(String name)(Code)
Look for an interpreter for a language with the given name or extension. If name is null, look for the first language available.



getInstance
public static Interpreter getInstance(String langName, Class langClass)(Code)



getInterpreter
public static Interpreter getInterpreter()(Code)



getLanguages
public static String[][] getLanguages()(Code)
Get a list of all available languages



getLexer
abstract public Lexer getLexer(InPort inp, gnu.text.SourceMessages messages)(Code)



getName
abstract public String getName()(Code)



getNamespaceOf
public int getNamespaceOf(Declaration decl)(Code)
Return the namespace (e.g value or function) of a Declaration. Return a bitmask of all the namespces "covered" by the Declaration.



getNewEnvironment
public Environment getNewEnvironment()(Code)



getOutputConsumer
public Consumer getOutputConsumer(OutPort out)(Code)



getPrompter
public Procedure getPrompter()(Code)



getTypeFor
abstract public Type getTypeFor(Class clas)(Code)



getTypeFor
public Type getTypeFor(String name)(Code)



getTypeFor
public Type getTypeFor(Expression exp)(Code)



hasSeparateFunctionNamespace
public boolean hasSeparateFunctionNamespace()(Code)
True if functions are in a separate anme space from variable. Is true for e.g. Common Lisp, Emacs Lisp; false for Scheme.



isTrue
public boolean isTrue(Object value)(Code)
Test if a value is considered "true" in this language.



lookup
public Object lookup(String name)(Code)



noValue
public Object noValue()(Code)
The value to return for a "void" result.



parse
abstract public ModuleExp parse(Environment env, Lexer lexer) throws java.io.IOException, gnu.text.SyntaxException(Code)



parseFile
abstract public ModuleExp parseFile(InPort port, gnu.text.SourceMessages messages)(Code)



print
public void print(Object obj, OutPort out)(Code)



print
public void print(Object value, OutPort out, boolean readable)(Code)



read
abstract public Object read(InPort in) throws java.io.IOException, gnu.text.SyntaxException(Code)



setEnvironment
public void setEnvironment(Environment environ)(Code)



string2Type
public static Type string2Type(String name)(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.