parse_string

parse_string -- parses an input string.

Syntax

parse_string (string)

		

Arguments

string

A character string representation of a Lisp expression

Returns

The first complete Lisp expression represented in the string.

Description

This function parses the input string using the Lisp parser, and returns the first complete expression found in the string. The rest of the string is ignored.

Example

    Gamma> a = parse_string("hello");
    hello
    Gamma> b = parse_string("(cos 5)");
    (cos 5)
    Gamma> c = parse_string("(+ 5 6) (/ 6 3)");
    (+ 5 6)
    Gamma> eval(b);
    0.28366218546322624627
    Gamma> eval(c);
    11
    Gamma>  
    		

See Also

eval_string, open_string

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.