Skip to main content

module lang::sexp::SExp

rascal-0.40.16

AST model for S-Expressions.

Usage

import lang::sexp::SExp;

Dependencies

import lang::sexp::\syntax::SExp;
import ParseTree;

data SExp

data SExp  
= string(String \str)
| \list(list[SExp] elts)
;

data String

data String  
= simple(SimpleString simpleStr)
| display(str display, SimpleString simpleStr)
;

data SimpleString

data SimpleString  
= raw(Raw raw)
| token(str \value)
| base64(list[str] chars)
| hex(list[str] digits)
| quoted(str \value)
;

data Raw

data Raw  
= raw(int size, str bytes)
;

function parseSExp

SExp parseSExp(str src, loc l)