gnu.q2.lang
Class Q2

java.lang.Object
  extended by gnu.expr.Language
      extended by gnu.kawa.lispexpr.LispLanguage
          extended by kawa.standard.Scheme
              extended by gnu.q2.lang.Q2

public class Q2
extends Scheme

Support for the experimental Q2 language. See the web site for information.


Field Summary
 
Fields inherited from class kawa.standard.Scheme
apply, applyToArgs, booleanType, displayFormat, forEach, instanceOf, isEq, isEqual, isEqv, isEven, isOdd, kawaEnvironment, map, not, nullEnvironment, numEqu, numGEq, numGrt, numLEq, numLss, r4Environment, r5Environment, unitNamespace, writeFormat
 
Fields inherited from class gnu.kawa.lispexpr.LispLanguage
bracket_apply_sym, bracket_list_sym, defaultReadTable, getNamedPartLocation, lookup_sym, quasiquote_sym, quote_sym, unquote_sym, unquotesplicing_sym
 
Fields inherited from class gnu.expr.Language
current, env_counter, environ, FUNCTION_NAMESPACE, global, NAMESPACE_PREFIX_NAMESPACE, PARSE_CURRENT_NAMES, PARSE_EXPLICIT, PARSE_FOR_APPLET, PARSE_FOR_EVAL, PARSE_FOR_SERVLET, PARSE_IMMEDIATE, PARSE_ONE_LINE, PARSE_PROLOG, requirePedantic, userEnv, VALUE_NAMESPACE
 
Constructor Summary
Q2()
           
 
Method Summary
static int compareIndentation(int indentation1, int indentation2)
          Compare two indentation amounts.
 ReadTable createReadTable()
          Create a fresh ReadTable appropriate for this language.
 Lexer getLexer(InPort inp, SourceMessages messages)
           
 Consumer getOutputConsumer(java.io.Writer out)
           
 Procedure getPrompter()
           
static Q2 getQ2Instance()
           
 Expression makeApply(Expression func, Expression[] args)
           
 Expression makeBody(Expression[] exps)
          Combine a consisting of a list of expression.
static void registerEnvironment()
          The compiler insert calls to this method for applications and applets.
 
Methods inherited from class kawa.standard.Scheme
asSymbol, builtin, checkDefaultBinding, eval, eval, eval, exp2Type, formatType, getFormat, getInstance, getName, getNamedType, getNamespaceOf, getTypeFor, getTypeFor, getTypeValue, string2Type
 
Methods inherited from class gnu.kawa.lispexpr.LispLanguage
declFromField, defSntxStFld, defSntxStFld, fromLangSymbol, getCompilation, langSymbolToSymbol, parse, resolve, selfEvaluatingSymbol
 
Methods inherited from class gnu.expr.Language
asType, booleanObject, coerceFromObject, coerceToObject, defAliasStFld, define, defineFunction, defineFunction, defProcStFld, defProcStFld, detect, detect, detect, emitCoerceToBoolean, emitPushBoolean, eval, eval, eval, eval, eval, eval, eval, eval, eval, getDefaultLanguage, getEnvironment, getEnvPropertyFor, getEnvPropertyFor, getInstance, getInstance, getInstanceFromFilenameExtension, getLangEnvironment, getLangTypeFor, getLanguages, getNewEnvironment, getSymbol, getTypeFor, getTypeFor, getTypeFor, hasNamespace, hasSeparateFunctionNamespace, isTrue, loadClass, lookup, lookupBuiltin, noValue, parse, parse, parse, parse, registerLanguage, restoreCurrent, runAsApplication, setCurrentLanguage, setDefaults, setSaveCurrent, unionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Q2

public Q2()
Method Detail

getQ2Instance

public static Q2 getQ2Instance()

getLexer

public Lexer getLexer(InPort inp,
                      SourceMessages messages)
Overrides:
getLexer in class LispLanguage

getOutputConsumer

public Consumer getOutputConsumer(java.io.Writer out)
Overrides:
getOutputConsumer in class Language

registerEnvironment

public static void registerEnvironment()
The compiler insert calls to this method for applications and applets.


makeBody

public Expression makeBody(Expression[] exps)
Description copied from class: LispLanguage
Combine a consisting of a list of expression.

Overrides:
makeBody in class LispLanguage

makeApply

public Expression makeApply(Expression func,
                            Expression[] args)
Overrides:
makeApply in class Scheme

getPrompter

public Procedure getPrompter()
Overrides:
getPrompter in class Language

createReadTable

public ReadTable createReadTable()
Description copied from class: LispLanguage
Create a fresh ReadTable appropriate for this language.

Overrides:
createReadTable in class Scheme

compareIndentation

public static int compareIndentation(int indentation1,
                                     int indentation2)
Compare two indentation amounts. An indentation is @{code (numberOfTabs<<16)+numberOfSpaces}. A comparison is indeterminate if it depends on tab-width - e.g. the number of tabs in indentation1 is less than indentation2, but it's the reverse when it comes to spaces.

Returns:
Integer.MIN_VALUE if the comparison is indeterminate; otherwise returns the "difference" between the two (where tabs count as 8 spaces).