The parser routines provide a general, easy interface between a program and the user, particularly for command-driven or other highly interactive programs. The basic cycle begins with the user inputting a line (optionally after some prompt) on the terminal. This line then can be analyzed by the program as a string of arguments. The program then can try to interpret each argument as a number or as a character string. Character strings can be checked if they are one of an allowed list of options. The actual details of how a line is interpreted depend on the particular program and how it uses the various parser facilities. An example of an input line might be:
Foo , 4.7 "Some information" - ! A comment
which is divided into three arguments: `Foo', `4.7' (which can be interpreted as a number), and ``Some information."
When parsing an input line, there are several special characters:
There are special characters whose interpretation depends on their position in the line:
Note that if command editing and recall are enabled, then a variety of control characters have special meanings for the parser (see below).