Changeset 5157


Ignore:
Timestamp:
12/16/03 00:35:42 (18 years ago)
Author:
piso
Message:

Moved GET-MACRO-DISPATCH-CHARACTER and SET-MACRO-DISPATCH-CHARACTER to Readtable.java.

File:
1 edited

Legend:

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

    r5146 r5157  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.535 2003-12-15 14:39:55 piso Exp $
     5 * $Id: Primitives.java,v 1.536 2003-12-16 00:35:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    35693569    };
    35703570
    3571     // ### get-dispatch-macro-character
    3572     // get-dispatch-macro-character disp-char sub-char &optional readtable
    3573     // => function
    3574     private static final Primitive GET_DISPATCH_MACRO_CHARACTER =
    3575         new Primitive("get-dispatch-macro-character","disp-char sub-char &optional readtable") {
    3576         public LispObject execute(LispObject[] args) throws ConditionThrowable
    3577         {
    3578             if (args.length < 2 || args.length > 3)
    3579                 signal(new WrongNumberOfArgumentsException(this));
    3580             char dispChar = LispCharacter.getValue(args[0]);
    3581             char subChar = LispCharacter.getValue(args[1]);
    3582             Readtable readtable;
    3583             if (args.length == 3)
    3584                 readtable = checkReadtable(args[2]);
    3585             else
    3586                 readtable = getCurrentReadtable();
    3587             return readtable.getDispatchMacroCharacter(dispChar, subChar);
    3588         }
    3589     };
    3590 
    3591     // ### set-dispatch-macro-character
    3592     // set-dispatch-macro-character disp-char sub-char new-function &optional readtable
    3593     // => t
    3594     private static final Primitive SET_DISPATCH_MACRO_CHARACTER =
    3595         new Primitive("set-dispatch-macro-character","disp-char sub-char new-function &optional readtable") {
    3596         public LispObject execute(LispObject[] args) throws ConditionThrowable
    3597         {
    3598             if (args.length < 3 || args.length > 4)
    3599                 signal(new WrongNumberOfArgumentsException(this));
    3600             char dispChar = LispCharacter.getValue(args[0]);
    3601             char subChar = LispCharacter.getValue(args[1]);
    3602             LispObject function = args[2];
    3603             Readtable readtable;
    3604             if (args.length == 4)
    3605                 readtable = checkReadtable(args[3]);
    3606             else
    3607                 readtable = getCurrentReadtable();
    3608             return readtable.setDispatchMacroCharacter(dispChar, subChar, function);
    3609         }
    3610     };
    3611 
    36123571    // ### read
    36133572    // read &optional input-stream eof-error-p eof-value recursive-p => object
Note: See TracChangeset for help on using the changeset viewer.