Changeset 10199


Ignore:
Timestamp:
10/23/05 16:05:09 (16 years ago)
Author:
piso
Message:

Symbol refactoring (work in progress).

Location:
trunk/j/src/org/armedbear/lisp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Do.java

    r8660 r10199  
    22 * Do.java
    33 *
    4  * Copyright (C) 2003-2004 Peter Graves
    5  * $Id: Do.java,v 1.12 2005-02-28 02:50:03 piso Exp $
     4 * Copyright (C) 2003-2005 Peter Graves
     5 * $Id: Do.java,v 1.13 2005-10-23 16:04:10 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2626    // ### do
    2727    private static final SpecialOperator DO =
    28         new SpecialOperator("do", "varlist endlist &body body")
     28        new SpecialOperator(Symbol.DO, "varlist endlist &body body")
    2929    {
    3030        public LispObject execute(LispObject args, Environment env)
     
    3636
    3737    // ### do*
    38     private static final SpecialOperator DO_ =
    39         new SpecialOperator("do*", "varlist endlist &body body")
     38    private static final SpecialOperator DO_STAR =
     39        new SpecialOperator(Symbol.DO_STAR, "varlist endlist &body body")
    4040    {
    4141        public LispObject execute(LispObject args, Environment env)
  • trunk/j/src/org/armedbear/lisp/SpecialOperators.java

    r10129 r10199  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: SpecialOperators.java,v 1.48 2005-10-17 03:57:56 piso Exp $
     5 * $Id: SpecialOperators.java,v 1.49 2005-10-23 16:05:09 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2828    // ### quote
    2929    private static final SpecialOperator QUOTE =
    30         new SpecialOperator("quote", "thing")
     30        new SpecialOperator(Symbol.QUOTE, "thing")
    3131    {
    3232        public LispObject execute(LispObject args, Environment env)
     
    4141    // ### if
    4242    private static final SpecialOperator IF =
    43         new SpecialOperator("if", "test then &optional else")
     43        new SpecialOperator(Symbol.IF, "test then &optional else")
    4444    {
    4545        public LispObject execute(LispObject args, Environment env)
     
    6666    // ### let
    6767    private static final SpecialOperator LET =
    68         new SpecialOperator("let", "bindings &body body")
     68        new SpecialOperator(Symbol.LET, "bindings &body body")
    6969    {
    7070        public LispObject execute(LispObject args, Environment env)
     
    7878
    7979    // ### let*
    80     private static final SpecialOperator LETX =
    81         new SpecialOperator("let*", "bindings &body body")
     80    private static final SpecialOperator LET_STAR =
     81        new SpecialOperator(Symbol.LET_STAR, "bindings &body body")
    8282    {
    8383        public LispObject execute(LispObject args, Environment env)
     
    207207    // ### symbol-macrolet
    208208    private static final SpecialOperator SYMBOL_MACROLET =
    209         new SpecialOperator("symbol-macrolet", "macrobindings &body body")
     209        new SpecialOperator(Symbol.SYMBOL_MACROLET, "macrobindings &body body")
    210210    {
    211211        public LispObject execute(LispObject args, Environment env)
     
    259259    };
    260260
    261     // ### load-time-value
    262     // load-time-value form &optional read-only-p => object
     261    // ### load-time-value form &optional read-only-p => object
    263262    private static final SpecialOperator LOAD_TIME_VALUE =
    264         new SpecialOperator("load-time-value", "form &optional read-only-p")
     263        new SpecialOperator(Symbol.LOAD_TIME_VALUE,
     264                            "form &optional read-only-p")
    265265    {
    266266        public LispObject execute(LispObject args, Environment env)
     
    280280    // ### locally
    281281    private static final SpecialOperator LOCALLY =
    282         new SpecialOperator("locally", "&body body")
     282        new SpecialOperator(Symbol.LOCALLY, "&body body")
    283283    {
    284284        public LispObject execute(LispObject args, Environment env)
     
    298298
    299299    // ### progn
    300     private static final SpecialOperator PROGN = new SpecialOperator("progn", "&rest forms")
     300    private static final SpecialOperator PROGN =
     301        new SpecialOperator(Symbol.PROGN, "&rest forms")
    301302    {
    302303        public LispObject execute(LispObject args, Environment env)
     
    315316    // ### flet
    316317    private static final SpecialOperator FLET =
    317         new SpecialOperator("flet", "definitions &body body")
     318        new SpecialOperator(Symbol.FLET, "definitions &body body")
    318319    {
    319320        public LispObject execute(LispObject args, Environment env)
     
    326327    // ### labels
    327328    private static final SpecialOperator LABELS =
    328         new SpecialOperator("labels", "definitions &body body")
     329        new SpecialOperator(Symbol.LABELS, "definitions &body body")
    329330    {
    330331        public LispObject execute(LispObject args, Environment env)
     
    360361                    symbol = checkSymbol(name.cadr());
    361362                } else
    362                     return signal(new TypeError(name, "valid function name"));
     363                    return signalTypeError(name, FUNCTION_NAME);
    363364                LispObject rest = def.cdr();
    364365                LispObject parameters = rest.car();
     
    399400    }
    400401
    401     // ### the
    402     // the value-type form => result*
    403     private static final SpecialOperator THE = new SpecialOperator("the", "type value") {
     402    // ### the value-type form => result*
     403    private static final SpecialOperator THE =
     404        new SpecialOperator(Symbol.THE, "type value")
     405    {
    404406        public LispObject execute(LispObject args, Environment env)
    405407            throws ConditionThrowable
     
    413415    // ### progv
    414416    private static final SpecialOperator PROGV =
    415         new SpecialOperator("progv", "symbols values &body body")
     417        new SpecialOperator(Symbol.PROGV, "symbols values &body body")
    416418    {
    417419        public LispObject execute(LispObject args, Environment env)
     
    444446    // ### declare
    445447    private static final SpecialOperator DECLARE =
    446         new SpecialOperator("declare", "&rest declaration-specifiers")
     448        new SpecialOperator(Symbol.DECLARE, "&rest declaration-specifiers")
    447449    {
    448450        public LispObject execute(LispObject args, Environment env)
     
    467469    // ### function
    468470    private static final SpecialOperator FUNCTION =
    469         new SpecialOperator("function", "thing")
     471        new SpecialOperator(Symbol.FUNCTION, "thing")
    470472    {
    471473        public LispObject execute(LispObject args, Environment env)
     
    518520    // ### setq
    519521    private static final SpecialOperator SETQ =
    520         new SpecialOperator("setq", "&rest vars-and-values")
     522        new SpecialOperator(Symbol.SETQ, "&rest vars-and-values")
    521523    {
    522524        public LispObject execute(LispObject args, Environment env)
  • trunk/j/src/org/armedbear/lisp/dolist.java

    r8660 r10199  
    22 * dolist.java
    33 *
    4  * Copyright (C) 2003-2004 Peter Graves
    5  * $Id: dolist.java,v 1.11 2005-02-28 02:50:05 piso Exp $
     4 * Copyright (C) 2003-2005 Peter Graves
     5 * $Id: dolist.java,v 1.12 2005-10-23 16:04:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2727    private dolist()
    2828    {
    29         super("dolist");
     29        super(Symbol.DOLIST);
    3030    }
    3131
  • trunk/j/src/org/armedbear/lisp/dotimes.java

    r10109 r10199  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: dotimes.java,v 1.15 2005-10-15 16:02:57 piso Exp $
     5 * $Id: dotimes.java,v 1.16 2005-10-23 16:04:35 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2626    private dotimes()
    2727    {
    28         super("dotimes");
     28        super(Symbol.DOTIMES);
    2929    }
    3030
Note: See TracChangeset for help on using the changeset viewer.