All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dakusui.logias.lisp.s.Sexp Maven / Gradle / Ivy

package com.github.dakusui.logias.lisp.s;

import com.google.gson.JsonElement;


public interface Sexp {
	public static enum Type {
		Atom,
		Pair,
	}
	public static final Sexp T = new Atom("T") {
		@Override public String stringValue() {
			return "$T";
		}
	};
	public static final Sexp nil = new Atom("nil") {
		@Override public String stringValue() {
			return "$nil";
		}
	};
	boolean isAtom();
	Sexp car();
	Sexp cdr();
	Type type();
	String print();
	SexpIterator iterator();
	Pair asPair();
	Atom asAtom();
	Literal asLiteral();
	Symbol asSymbol();
	JsonElement toJson();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy