[ top | up ]

Parse Expressions

Syntax

parse(file="", n=NULL, text=NULL, prompt=NULL,
        white=FALSE)

Arguments

file the name of a file to read the expressions from. If the file is "" and text is missing or NULL then input is taken from the keyboard.
n the number of statements to parse. If n is negative the file is parsed in its entirety. When parsing takes place from the keyboard, n is always 1.
text text to parse, quoted.
prompt the prompt to print when parseing from the keyboard
white if TRUE then any white space separates expressions otherwise only newlines or semicolons do.

Description

parse returns the parsed but unevaluated expressions in a list. Each element of the list is of mode expression.

See Also

scan, source, eval.

Examples

# parse 5 statements from the file "foo" parse(file="foo",n=5)