ReaderConstituent.java 659 B

123456789101112131415161718192021
  1. // Copyright (c) 2013 Per M.A. Bothner
  2. // This is free software; for terms and warranty disclaimer see ./COPYING.
  3. package gnu.kawa.lispexpr;
  4. import gnu.text.Lexer;
  5. import gnu.text.SyntaxException;
  6. public class ReaderConstituent extends ReaderMisc {
  7. public ReaderConstituent(int kind) { super(kind); }
  8. public Object read(Lexer in, int ch, int count)
  9. throws java.io.IOException, SyntaxException {
  10. LispReader reader = (LispReader) in;
  11. int startPos = reader.tokenBufferLength;
  12. ReadTable rtable = ReadTable.getCurrent();
  13. Object result = reader.readAndHandleToken(ch, startPos, rtable);
  14. return result;
  15. }
  16. }