Changeset 8340


Ignore:
Timestamp:
01/11/05 17:45:35 (17 years ago)
Author:
piso
Message:

checkInvalid()

File:
1 edited

Legend:

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

    r8087 r8340  
    22 * Readtable.java
    33 *
    4  * Copyright (C) 2003-2004 Peter Graves
    5  * $Id: Readtable.java,v 1.36 2004-11-03 15:39:01 piso Exp $
     4 * Copyright (C) 2003-2005 Peter Graves
     5 * $Id: Readtable.java,v 1.37 2005-01-11 17:45:35 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4242    public Readtable()
    4343    {
     44        attributes[8]    = ATTR_INVALID; // backspace
     45        attributes[127]  = ATTR_INVALID; // rubout
     46
    4447        attributes[9]    = ATTR_WHITESPACE; // tab
    4548        attributes[10]   = ATTR_WHITESPACE; // linefeed
     
    182185        return ATTR_CONSTITUENT;
    183186    }
     187   
     188    public void checkInvalid(char c) throws ConditionThrowable
     189    {
     190        if (c < CHAR_MAX && attributes[c] == ATTR_INVALID)
     191            signal(new ReaderError("Invalid character"));
     192    }
    184193
    185194    public LispObject getReaderMacroFunction(char c)
Note: See TracChangeset for help on using the changeset viewer.