diff options
author | dos-reis <gdr@axiomatics.org> | 2008-09-18 03:16:31 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-09-18 03:16:31 +0000 |
commit | b470f6e697d62ac77ea6c880d7199de801988ba7 (patch) | |
tree | bde88839ea835fa4454db8dc8868ca8d19f45bcf | |
parent | 48ce2222cc914d9eb522d0d474b9d48499bb891a (diff) | |
download | open-axiom-b470f6e697d62ac77ea6c880d7199de801988ba7.tar.gz |
* interp/g-util.boot (getTypeOfSyntax): Infer more syntax domains.
* algebra/syntax.spad.pamphlet: Add more syntax domains.
* algebra/exposed.lsp.pamphlet: Expose more syntax object domains.
* algebra/Makefile.pamphlet (axiom_algebra_layer_user): Add more
syntax object files.
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | configure.ac.pamphlet | 2 | ||||
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 12 | ||||
-rw-r--r-- | src/algebra/Makefile.pamphlet | 12 | ||||
-rw-r--r-- | src/algebra/exposed.lsp.pamphlet | 16 | ||||
-rw-r--r-- | src/algebra/syntax.spad.pamphlet | 369 | ||||
-rw-r--r-- | src/interp/g-util.boot | 10 |
9 files changed, 421 insertions, 28 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2008-09-12. +# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2008-09-17. # # Report bugs to <open-axiom-bugs@lists.sf.net>. # @@ -713,8 +713,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenAxiom' PACKAGE_TARNAME='openaxiom' -PACKAGE_VERSION='1.3.0-2008-09-12' -PACKAGE_STRING='OpenAxiom 1.3.0-2008-09-12' +PACKAGE_VERSION='1.3.0-2008-09-17' +PACKAGE_STRING='OpenAxiom 1.3.0-2008-09-17' PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net' ac_unique_file="src/Makefile.pamphlet" @@ -1405,7 +1405,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenAxiom 1.3.0-2008-09-12 to adapt to many kinds of systems. +\`configure' configures OpenAxiom 1.3.0-2008-09-17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1475,7 +1475,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2008-09-12:";; + short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2008-09-17:";; esac cat <<\_ACEOF @@ -1579,7 +1579,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenAxiom configure 1.3.0-2008-09-12 +OpenAxiom configure 1.3.0-2008-09-17 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1593,7 +1593,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenAxiom $as_me 1.3.0-2008-09-12, which was +It was created by OpenAxiom $as_me 1.3.0-2008-09-17, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -26099,7 +26099,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenAxiom $as_me 1.3.0-2008-09-12, which was +This file was extended by OpenAxiom $as_me 1.3.0-2008-09-17, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26148,7 +26148,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -OpenAxiom config.status 1.3.0-2008-09-12 +OpenAxiom config.status 1.3.0-2008-09-17 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 275a952e..a1535205 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ sinclude(config/open-axiom.m4) sinclude(config/aclocal.m4) -AC_INIT([OpenAxiom], [1.3.0-2008-09-12], +AC_INIT([OpenAxiom], [1.3.0-2008-09-17], [open-axiom-bugs@lists.sf.net]) AC_CONFIG_AUX_DIR(config) diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index 7f0a7022..4bbbf5f4 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -1127,7 +1127,7 @@ information: <<Autoconf init>>= sinclude(config/open-axiom.m4) sinclude(config/aclocal.m4) -AC_INIT([OpenAxiom], [1.3.0-2008-09-12], +AC_INIT([OpenAxiom], [1.3.0-2008-09-17], [open-axiom-bugs@lists.sf.net]) @ diff --git a/src/ChangeLog b/src/ChangeLog index 4deded32..d9a2fe40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-09-17 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/g-util.boot (getTypeOfSyntax): Infer more syntax domains. + * algebra/syntax.spad.pamphlet: Add more syntax domains. + * algebra/exposed.lsp.pamphlet: Expose more syntax object domains. + * algebra/Makefile.pamphlet (axiom_algebra_layer_user): Add more + syntax object files. + 2008-09-14 Gabriel Dos Reis <gdr@cs.tamu.edu> * algebra/net.spad.pamphlet (Conduit): New. diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 0facef02..6c8fcb4e 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -819,11 +819,13 @@ axiom_algebra_layer_23_objects = \ $(addprefix $(OUT)/, \ $(addsuffix .$(FASLEXT),$(axiom_algebra_layer_23))) axiom_algebra_layer_user = \ - RINTERP ASTCAT ASTCAT- SASTCAT SASTCAT- HEADAST \ - LITERAL IDENT TYPEAST IMPTAST MAPPAST ATTRAST \ - JOINAST IFAST RPTAST WHILEAST INAST CLLCAST \ - LSTAST EXITAST RETAST SEGAST PRTDAST CRCAST \ - LETAST + RINTERP ASTCAT ASTCAT- SASTCAT SASTCAT- HEADAST \ + LITERAL IDENT TYPEAST IMPTAST MAPPAST ATTRAST \ + JOINAST IFAST RPTAST WHILEAST INAST CLLCAST \ + LSTAST EXITAST RETAST SEGAST PRTDAST CRCAST \ + LETAST SUCHAST RDUCEAST COLONAST ADDAST CAPSLAST \ + CASEAST HASAST ISAST CATAST WHEREAST COMMAAST \ + QQUTAST DEFAST MACROAST axiom_algebra_layer_user_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user)) diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 170c5cab..f0518711 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -1246,11 +1246,13 @@ Rather than classify newly created algebra into the existing type lattice we add it here. <<USERLAYER>>= axiom_algebra_layer_user = \ - RINTERP ASTCAT ASTCAT- SASTCAT SASTCAT- HEADAST \ - LITERAL IDENT TYPEAST IMPTAST MAPPAST ATTRAST \ - JOINAST IFAST RPTAST WHILEAST INAST CLLCAST \ - LSTAST EXITAST RETAST SEGAST PRTDAST CRCAST \ - LETAST + RINTERP ASTCAT ASTCAT- SASTCAT SASTCAT- HEADAST \ + LITERAL IDENT TYPEAST IMPTAST MAPPAST ATTRAST \ + JOINAST IFAST RPTAST WHILEAST INAST CLLCAST \ + LSTAST EXITAST RETAST SEGAST PRTDAST CRCAST \ + LETAST SUCHAST RDUCEAST COLONAST ADDAST CAPSLAST \ + CASEAST HASAST ISAST CATAST WHEREAST COMMAAST \ + QQUTAST DEFAST MACROAST axiom_algebra_layer_user_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_user)) diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet index a4b5a8c4..da109105 100644 --- a/src/algebra/exposed.lsp.pamphlet +++ b/src/algebra/exposed.lsp.pamphlet @@ -51,6 +51,7 @@ '( ;;define the groups |basic| |naglink| |anna| |categories| |Hidden| |defaults| (|basic| + (|AddAst| . ADDAST) (|AlgebraicManipulations| . ALGMANIP) (|AlgebraicNumber| . AN) (|AlgFactor| . ALGFACT) @@ -76,14 +77,19 @@ (|Boolean| . BOOLEAN) (|Byte| . BYTE) (|ByteArray| . BYTEARY) + (|CallAst| . CALLAST) + (|CapsuleAst| . CAPSLAST) (|CardinalNumber| . CARD) (|CartesianTensor| . CARTEN) (|CartesianTensorFunctions2| . CARTEN2) + (|CaseAst| . CASEAST) + (|CategoryAst| . CATAST) (|Character| . CHAR) (|CharacterClass| . CCLASS) (|CharacteristicPolynomialPackage| . CHARPOL) (|CliffordAlgebra| . CLIF) (|Color| . COLOR) + (|CommaAst| . COMMAAST) (|CommonDenominator| . CDEN) (|Commutator| . COMM) (|Complex| . COMPLEX) @@ -91,6 +97,7 @@ (|ComplexFunctions2| . COMPLEX2) (|ComplexRootPackage| . CMPLXRT) (|ComplexTrigonometricManipulations| . CTRIGMNP) + (|ColonAst| . COLONAST) (|ConstructorCall| . CTORCALL) (|ContinuedFraction| . CONTFRAC) (|Contour| . CONTOUR) @@ -101,6 +108,7 @@ (|DataBuffer| . DATABUF) (|DataList| . DLIST) (|DecimalExpansion| . DECIMAL) + (|DefinitionAst| . DEFAST) (|DenavitHartenbergMatrix| . DHMATRIX) (|Dequeue| . DEQUEUE) (|DiophantineSolutionPackage| . DIOSP) @@ -170,6 +178,7 @@ (|GroebnerPackage| . GB) (|GroebnerFactorizationPackage| . GBF) (|HallBasis| . HB) + (|HasAst| . HASAST) (|HeadAst| . HEADAST) (|Heap| . HEAP) (|HexadecimalExpansion| . HEXADEC) @@ -200,11 +209,13 @@ (|InventorRenderPackage| . IVREND) (|InverseLaplaceTransform| . INVLAPLA) (|IrrRepSymNatPackage| . IRSN) + (|IsAst| . ISAST) (|JavaBytecode| . JAVACODE) (|KernelFunctions2| . KERNEL2) (|KeyedAccessFile| . KAFILE) (|LaplaceTransform| . LAPLACE) (|LazardMorenoSolvingPackage| . LAZM3PK) + (|LetAst| . LETAST) (|Library| . LIB) (|LieSquareMatrix| . LSQM) (|LinearOrdinaryDifferentialOperator| . LODO) @@ -216,6 +227,7 @@ (|ListFunctions3| . LIST3) (|ListToMap| . LIST2MAP) (|Literal| . LITERAL) + (|MacroAst| . MACROAST) (|MakeFloatCompiledFunction| . MKFLCFN) (|MakeFunction| . MKFUNC) (|MakeRecord| . MKRECORD) @@ -312,6 +324,7 @@ (|PropositionalFormula| . PROPFRML) (|QuadraticForm| . QFORM) (|QuasiComponentPackage| . QCMPACK) + (|QuasiquoteAst| . QQUTAST) (|Quaternion| . QUAT) (|QuaternionCategoryFunctions2| . QUATCT2) (|QueryEquation| . QEQUAT) @@ -350,9 +363,11 @@ (|ScriptFormulaFormat| . FORMULA) (|ScriptFormulaFormat1| . FORMULA1) (|Segment| . SEG) + (|SegmentAst| . SEGAST) (|SegmentBinding| . SEGBIND) (|SegmentBindingFunctions2| . SEGBIND2) (|SegmentFunctions2| . SEG2) + (|SequenceAst| . SEQAST) (|Set| . SET) (|SimpleAlgebraicExtensionAlgFactor| . SAEFACT) (|SimplifyAlgebraicNumberConvertPackage| . SIMPAN) @@ -372,6 +387,7 @@ (|StreamFunctions3| . STREAM3) (|String| . STRING) (|SturmHabichtPackage| . SHP) + (|SuchThatAst| . SUCHTAST) (|Symbol| . SYMBOL) (|SymmetricGroupCombinatoricFunctions| . SGCF) (|Syntax| . SYNTAX) diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet index bd430752..04018708 100644 --- a/src/algebra/syntax.spad.pamphlet +++ b/src/algebra/syntax.spad.pamphlet @@ -428,7 +428,7 @@ SpadSyntaxCategory(): Category == AbstractSyntaxCategory renderWhile(x: List Syntax): OutputForm == elt('WhileAst::OutputForm, - ['condition::OutputForm = renderSyntax(x : Syntax)])$OutputForm + ['condition::OutputForm = renderSyntax first x])$OutputForm renderIn(x: List Syntax): OutputForm == elt('InAst::OutputForm, @@ -471,6 +471,42 @@ SpadSyntaxCategory(): Category == AbstractSyntaxCategory ['lhs::OutputForm = renderSyntax first x, 'rhs::OutputForm = renderSyntax second x])$OutputForm + renderSuchThat(x: List Syntax): OutputForm == + elt('SuchThatAst::OutputForm, + ['predicate::OutputForm = renderSyntax first x])$OutputForm + + renderColon(x: List Syntax): OutputForm == + elt('ColonAst::OutputForm, + ['lhs::OutputForm = renderSyntax first x, + 'rhs::OutputForm = renderSyntax second x])$OutputForm + + renderCapsule(x: List Syntax): OutputForm == + elt('CapsuleAst::OutputForm, + ['body::OutputForm = + [renderSyntax s for s in x]::List(OutputForm)::OutputForm]) + + renderBinaryExpr(op: Symbol, args: List Syntax): OutputForm == + elt(op::OutputForm, + ['lhs::OutputForm = renderSyntax first args, + 'rhs::OutputForm = renderSyntax second args])$OutputForm + + renderCategory(x: List Syntax): OutputForm == + elt('CategoryAst::OutputForm, + ['kind::OutputForm = renderSyntax first x, + 'body::OutputForm = + [renderSyntax s for s in x]::List(OutputForm)::OutputForm]) + + renderDefinition(x: List Syntax): OutputForm == + elt('DefinitionAst::OutputForm, + ['head::OutputForm = renderSyntax first x, + 'signature::OutputForm = renderSyntax second x, + 'body::OutputForm = renderSyntax last x])$OutputForm + + renderMacro(x: List Syntax): OutputForm == + elt('MacroAst::OutputForm, + ['head::OutputForm = renderSyntax first x, + 'body::OutputForm = renderSyntax last x])$OutputForm + renderSyntax x == compound? x => op := getOperator x @@ -493,6 +529,15 @@ SpadSyntaxCategory(): Category == AbstractSyntaxCategory op = 'SEGMENT => renderSegment args op = 'SEQ => renderSequence args op = '%LET => renderLet args + op = '_| => renderSuchThat args + op = '_: => renderColon args + op = 'CAPSULE => renderCapsule args + op = '_case => renderBinaryExpr('CaseAst, args) + op = '_has => renderBinaryExpr('HasAst, args) + op = '_is => renderBinaryExpr('IsAst, args) + op = 'CATEGORY => renderCategory args + op = 'DEF => renderDefinition args + op = 'MDEF => renderMacro args x::OutputForm x::OutputForm @@ -826,6 +871,27 @@ CollectAst(): Public == Private where @ +\subsection{The ReduceAst domain} + +<<domain RDUCEAST ReduceAst>>= +)abbrev domain RDUCEAST ReduceAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: August 30, 2008 +++ Description: This domain represents list reduction syntax. +ReduceAst(): Public == Private where + Public == SpadSyntaxCategory with + operator: % -> Syntax + ++ operator(e) returns the magma operation being applied. + body: % -> Syntax + ++ body(e) return the list of expressions being redcued. + Private == add + Rep == List Syntax + operator x == second rep x + body x == third rep x + +@ + \subsection{The ConstructAst domain} <<domain LSTAST ConstructAst>>= @@ -859,15 +925,15 @@ ExitAst(): Public == Private where Public == SpadSyntaxCategory with expression: % -> Syntax ++ expression(e) returns the exit expression of `e'. + level: % -> Integer + ++ level(e) returns the nesting exit level of `e' Private == add - import Pair - Rep == Pair(Symbol,Syntax) - expression x == second rep x - + Rep == List Syntax + expression x == third rep x + level x == (second rep x) : Integer @ - \subsection{The ReturnAst domain} <<domain RETAST ReturnAst>>= @@ -1025,11 +1091,14 @@ CallAst(): Public == Private where )abbrev domain SEGAST SegmentAst ++ Author: Gabriel Dos Reis ++ Date Created: November 10, 2007 -++ Date Last Modified: August 30, 2008 +++ Date Last Modified: September 17, 2008 ++ Description: This domain represents segement expressions. SegmentAst(): Public == Private where Public == SpadSyntaxCategory with bounds: % -> List Syntax + ++ bounds(s) returns the bounds of the segment `s'. If + ++ `s' designates an infinite interval, then the returns + ++ list a singleton list. Private == add Rep == List Syntax bounds x == rest rep x @@ -1037,6 +1106,277 @@ SegmentAst(): Public == Private where @ +\subsection{The SuchThatAst domain} + +<<domain SUCHTAST SuchThatAst>>= +)abbrev domain SUCHTAST SuchThatAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents the filter iterator syntax. +SuchThatAst(): Public == Private where + Public == SpadSyntaxCategory with + predicate: % -> Syntax + ++ predicate(e) returns the syntax object for the predicate + ++ in the filter iterator syntax `e'. + Private == add + Rep == List Syntax + predicate e == second rep x +@ + +\subsection{The ColonAst domain} + +<<domain COLONAST ColonAst>>= +)abbrev domain COLONAST ColonAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents type specification +++ for an identifier or expression. +ColonAst(): Public == Private where + Public == SpadSyntaxCategory with + lhs: % -> Syntax + ++ lhs(e) returns the left hand side of the colon expression `e'. + rhs: % -> TypeAst + ++ rhs(e) returns the right hand side of the colon expression `e'. + Private == add + Rep == List Syntax + lhs x == second rep x + rhs x == (third rep x) : TypeAst +@ + +\subsection{The AddAst domain} + +<<domain ADDAST AddAst>>= +)abbrev domain ADDAST AddAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents the syntax for an add-expression. +AddAst(): Public == Private where + Public == SpadSyntaxCategory with + base: % -> Syntax + ++ base(d) returns the base domain(s) of the add-domain expression. + body: % -> Syntax + ++ base(d) returns the actual body of the add-domain expression `d'. + Private == add + Rep == List Syntax + base x == second rep x + body x == third rep x +@ + + +\subsection{The CapsuleAst domain} + +<<domain CAPSLAST CapsuleAst>>= +)abbrev domain CAPSLAST CapsuleAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents the capsule of a domain definition. +CapsuleAst(): Public == Private where + Public == SpadSyntaxCategory with + body: % -> List Syntax + ++ body(c) returns the list of top level expressions appearing in `c'. + Private == add + Rep == Pair(Symbol, List Syntax) + body x == second rep x +@ + +\subsection{The CaseAst domain} + +<<domain CASEAST CaseAst>>= +)abbrev domain CASEAST CaseAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents a `case' expression. +CaseAst(): Public == Private where + Public == SpadSyntaxCategory with + lhs: % -> Syntax + ++ lhs(e) returns the left hand side of the case expression `e'. + rhs: % -> Syntax + ++ rhs(e) returns the right hand side of the case expression `e'. + Private == add + Rep == List Syntax + lhs x == second rep x + rhs x == third rep x +@ + + +\subsection{The HasAst domain} + +<<domain HASAST HasAst>>= +)abbrev domain HASAST HasAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents a `has' expression. +HasAst(): Public == Private where + Public == SpadSyntaxCategory with + lhs: % -> Syntax + ++ lhs(e) returns the left hand side of the has expression `e'. + rhs: % -> Syntax + ++ rhs(e) returns the right hand side of the case expression `e'. + Private == add + Rep == List Syntax + lhs x == second rep x + rhs x == third rep x +@ + +\subsection{The IsAst domain} + +<<domain ISAST IsAst>>= +)abbrev domain ISAST IsAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents a `has' expression. +IsAst(): Public == Private where + Public == SpadSyntaxCategory with + lhs: % -> Syntax + ++ lhs(e) returns the left hand side of the is expression `e'. + rhs: % -> Syntax + ++ rhs(e) returns the right hand side of the is expression `e'. + Private == add + Rep == List Syntax + lhs x == second rep x + rhs x == third rep x +@ + +\subsection{The CategoryAst domain} + +<<domain CATAST CategoryAst>>= +)abbrev domain CATAST CategoryAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 17, 2008 +++ Description: This domain represents the unnamed category defined +++ by a list of exported signatures +CategoryAst(): Public == Private where + Public == SpadSyntaxCategory with + kind: % -> Symbol + ++ kind(c) returns the kind of unnamed category, either + ++ 'domain' or 'package'. + body: % -> List Syntax + ++ body(c) returns the list of exports in category syntax `c'. + Private == add + Rep == List Syntax + kind x == second rep x + body x == rest rest rep x +@ + +\subsection{The WhereAst domain} + +<<domain WHEREAST WhereAst>>= +)abbrev domain WHEREAST WhereAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 18, 2008 +++ Description: This domain represents the syntax of a `where' expression. +WhereAst(): Public == Private where + Public == SpadSyntaxCategory with + mainExpression: % -> Syntax + ++ mainExpression(e) returns the main expression of the + ++ `where' expression `e'. + qualifier: % -> Syntax + ++ qualifier(e) returns the qualifier of the expression `e'. + Private == add + Rep == List Syntax + mainExpression x == second rep x + qualifier x == third rep x +@ + +\subsection{The CommaAst domain} + +<<domain COMMAAST CommaAst>>= +)abbrev domain COMMAAST CommaAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 18, 2008 +++ Description: This domain represents the syntax of a comma-separated +++ list of expressions. +CommaAst(): Public == Private where + Public == SpadSyntaxCategory with + body: % -> List Syntax + ++ body(e) returns the list of expressions making up `e'. + Private == add + Rep == List Syntax + body x == rest rep x +@ + + +\subsection{The QuasiquoteAst domain} + +<<domain QQUTAST QuasiquoteAst>>= +)abbrev domain QQUTAST QuasiquoteAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 18, 2008 +++ Description: This domain represents the syntax of a quasiquote +++ expression. +QuasiquoteAst(): Public == Private where + Public == SpadSyntaxCategory with + expression: % -> Syntax + ++ expression(e) returns the syntax for the expression being quoted. + Private == add + Rep == List Syntax + expression x == second rep x +@ + + +\subsection{The DefinitionAst domain} + +<<domain DEFAST DefinitionAst>>= +)abbrev domain DEFAST DefinitionAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 18, 2008 +++ Description: This domain represents the syntax of a definition. +DefinitionAst(): Public == Private where + Public == SpadSyntaxCategory with + head: % -> List Identifier + ++ head(d) returns the head of the definition `d'. This is a + ++ list of identifiers starting with the name of the operation + ++ followed by the name of the parameters, if any. + signature: % -> Signature + ++ signature(d) returns the signature of the operation being + ++ defined. Note that this list may be partial in that it + ++ contains only the types actually specified in the definition. + body: % -> Syntax + ++ body(d) returns the right hand side of the definition `d'. + Private == add + Rep == List Syntax + head x == (second rep x) : List Identifier + signature x == (third rep x) : Signature + body x == last rep x + +@ + + +\subsection{The MacroAst domain} + +<<domain MACROAST MacroAst>>= +)abbrev domain MACROAST MacroAst +++ Author: Gabriel Dos Reis +++ Date Created: November 10, 2007 +++ Date Last Modified: September 18, 2008 +++ Description: This domain represents the syntax of a macro definition. +MacroAst(): Public == Private where + Public == SpadSyntaxCategory with + head: % -> List Identifier + ++ head(m) returns the head of the macro definition `m'. This is a + ++ list of identifiers starting with the name of the macro + ++ followed by the name of the parameters, if any. + body: % -> Syntax + ++ body(m) returns the right hand side of the definition `m'. + Private == add + Rep == List Syntax + head x == (second rep x) : List Identifier + body x == last rep x + +@ + \section{License} @@ -1107,6 +1447,21 @@ SegmentAst(): Public == Private where <<domain RSTRCAST RestrictAst>> <<domain LETAST LetAst>> +<<domain RDUCEAST ReduceAst>> +<<domain SUCHTAST SuchThatAst>> +<<domain COLONAST ColonAst>> +<<domain ADDAST AddAst>> +<<domain CAPSLAST CapsuleAst>> +<<domain CASEAST CaseAst>> +<<domain HASAST HasAst>> +<<domain ISAST IsAst>> +<<domain CATAST CategoryAst>> +<<domain WHEREAST WhereAst>> +<<domain COMMAAST CommaAst>> +<<domain QQUTAST QuasiquoteAst>> +<<domain DEFAST DefinitionAst>> +<<domain MACROAST MacroAst>> + @ \end{document} diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 6d3fe39f..220518ee 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -145,6 +145,16 @@ getTypeOfSyntax t == op = "::" => '(CoerceAst) op = "@" => '(RestrictAst) op = "%LET" => '(LetAst) + op = "|" => '(SuchThatAst) + op = ":" => '(ColonAst) + op = "CAPSULE" => '(CapsuleAst) + op = "case" => '(CaseAst) + op = "has" => '(HasAst) + op = "is" => '(IsAst) + op = "CATEGORY" => '(CategoryAst) + op = "DEF" => '(DefinitionAst) + op = "MDEF" => '(MacroAst) + op in '(ATTRIBUTE %Attribute) => '(AttributeAst) $Syntax --% |