diff options
author | dos-reis <gdr@axiomatics.org> | 2009-01-10 23:59:18 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-01-10 23:59:18 +0000 |
commit | d813447db270d12283436a70e3ed6ef6887016e0 (patch) | |
tree | 1fdf0abda9b6cff930e09af858b5b41ad8f42e08 | |
parent | 447540cef1c15768e7aa15679696ed4dd7b2d151 (diff) | |
download | open-axiom-d813447db270d12283436a70e3ed6ef6887016e0.tar.gz |
* interp/parse.boot ($parsingType): New.
(parseType): New. Parse types forms.
(parseTypeList): New. Parse list of type forms.
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | configure.ac.pamphlet | 2 | ||||
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/parse.boot | 35 |
5 files changed, 40 insertions, 23 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-2009-01-05. +# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2009-01-10. # # 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-2009-01-05' -PACKAGE_STRING='OpenAxiom 1.3.0-2009-01-05' +PACKAGE_VERSION='1.3.0-2009-01-10' +PACKAGE_STRING='OpenAxiom 1.3.0-2009-01-10' 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-2009-01-05 to adapt to many kinds of systems. +\`configure' configures OpenAxiom 1.3.0-2009-01-10 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-2009-01-05:";; + short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2009-01-10:";; 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-2009-01-05 +OpenAxiom configure 1.3.0-2009-01-10 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-2009-01-05, which was +It was created by OpenAxiom $as_me 1.3.0-2009-01-10, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -26424,7 +26424,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-2009-01-05, which was +This file was extended by OpenAxiom $as_me 1.3.0-2009-01-10, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26473,7 +26473,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -OpenAxiom config.status 1.3.0-2009-01-05 +OpenAxiom config.status 1.3.0-2009-01-10 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 ab01e655..fb231973 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-2009-01-05], +AC_INIT([OpenAxiom], [1.3.0-2009-01-10], [open-axiom-bugs@lists.sf.net]) AC_CONFIG_AUX_DIR(config) diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index c88ce121..adb5b1b1 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -1126,7 +1126,7 @@ information: <<Autoconf init>>= sinclude(config/open-axiom.m4) sinclude(config/aclocal.m4) -AC_INIT([OpenAxiom], [1.3.0-2009-01-05], +AC_INIT([OpenAxiom], [1.3.0-2009-01-10], [open-axiom-bugs@lists.sf.net]) @ diff --git a/src/ChangeLog b/src/ChangeLog index 7c025063..ff7d3a44 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-01-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/parse.boot ($parsingType): New. + (parseType): New. Parse types forms. + (parseTypeList): New. Parse list of type forms. + 2009-01-09 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/compiler.boot (compPredicate): Rename from compBoolean. diff --git a/src/interp/parse.boot b/src/interp/parse.boot index eba9defb..cff6ef7c 100644 --- a/src/interp/parse.boot +++ b/src/interp/parse.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- Copyright (C) 2007-2009, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -51,6 +51,9 @@ $defOp := nil ++ to Lisp. That usage is being phased out though. $normalizeTree := false +++ True if we know we are parsing a form supposed to designate a type. +$parsingType := false + parseTransform: %ParseForm -> %Form parseTransform x == $defOp: local:= nil @@ -68,7 +71,13 @@ parseTran x == r SYMBOLP u and (fn:= GET(u,'parseTran)) => FUNCALL(fn,x) [parseTran op,:parseTranList argl] - + +parseType t == + $parsingType: local := true + parseTran t + +parseTypeList l == + mapInto(l, function parseType) parseAtom: %Atom -> %Form parseAtom x == @@ -145,7 +154,7 @@ parseColon: %ParseForm -> %Form parseColon u == u isnt [":",:.] => systemErrorHere ["parseColon",u] u is [":",x] => [":",parseTran x] - u is [":",x,typ] => [":",parseTran x,parseTran typ] + u is [":",x,typ] => [":",parseTran x,parseType typ] u -- ??? This parser is unused at the moment. @@ -167,23 +176,23 @@ transUnCons u == parseCoerce: %ParseForm -> %Form parseCoerce t == t isnt [.,x,typ] => systemErrorHere ["parseCoerce",t] - ["::",parseTran x,parseTran typ] + ["::",parseTran x,parseType typ] parseAtSign: %ParseForm -> %Form parseAtSign t == t isnt [.,x,typ] => systemErrorHere ["parseAtSign",t] - ["@",parseTran x,parseTran typ] + ["@",parseTran x,parseType typ] parsePretend: %ParseForm -> %Form parsePretend t == t isnt ["pretend",x,typ] => systemErrorHere ["parsePretend",t] - ["pretend",parseTran x,parseTran typ] + ["pretend",parseTran x,parseType typ] parseAtAt: %ParseForm -> %Form parseAtAt t == t isnt ["@@",x,typ] => systemErrorHere ["parseAtAt",t] - ["@@",parseTran x,parseTran typ] + ["@@",parseTran x,parseType typ] parseHas: %ParseForm -> %Form parseHas t == @@ -208,7 +217,7 @@ parseDEF: %ParseForm -> %Form parseDEF t == t isnt ["DEF",$lhs,tList,specialList,body] => systemErrorHere ["parseDEF",t] setDefOp $lhs - ["DEF",parseLhs $lhs,parseTranList tList,parseTranList specialList, + ["DEF",parseLhs $lhs,parseTypeList tList,parseTranList specialList, parseTranCheckForRecord(body,opOf $lhs)] parseLhs: %ParseForm -> %Form @@ -222,7 +231,7 @@ parseMDEF: %ParseForm -> %Form parseMDEF t == t isnt ["MDEF",$lhs,tList,specialList,body] => systemErrorHere ["parseMDEF",t] - ["MDEF",parseTran $lhs,parseTranList tList,parseTranList specialList, + ["MDEF",parseTran $lhs,parseTypeList tList,parseTranList specialList, parseTranCheckForRecord(body,opOf $lhs)] parseTranCheckForRecord: (%ParseForm,%ParseForm) -> %Form @@ -236,6 +245,7 @@ parseTranCheckForRecord(x,op) == parseCategory: %ParseForm -> %Form parseCategory t == t isnt ["CATEGORY",:x] => systemErrorHere ["parseCategory",t] + $parsingType: local := true l:= parseTranList parseDropAssertions x key:= CONTAINED("$",l) => "domain" @@ -325,7 +335,7 @@ parseReturn t == parseJoin: %ParseForm -> %Form parseJoin t == t isnt ["Join",:l] => systemErrorHere ["parseJoin",t] - ["Join",:fn parseTranList l] where + ["Join",:fn parseTypeList l] where fn l == null l => nil l is [["Join",:x],:y] => [:x,:fn y] @@ -377,8 +387,9 @@ parseIf t == --this assumes that l has no exits a is ["IF", =p,a',.] => ["IF",p,a',b] b is ["IF", =p,.,b'] => ["IF",p,a,b'] - makeSimplePredicateOrNil p is ["SEQ",:s,["exit",1,val]] => - parseTran ["SEQ",:s,["exit",1,incExitLevel ["IF",val,a,b]]] + not $parsingType and + (makeSimplePredicateOrNil p is ["SEQ",:s,["exit",1,val]]) => + parseTran ["SEQ",:s,["exit",1,incExitLevel ["IF",val,a,b]]] ["IF",p,a,b] makeSimplePredicateOrNil: %ParseForm -> %Form |