User Tools

Site Tools


jvs:cigal:manual:chapter1:parser

CIGAL Reference Manual, Chapter 1 (Topics): parser

Parser -- The Parser

Command syntax is defined by the command line parser, the part of CIGAL responsible for reading commands and breaking them into their constituent parts. The parser scans through the line, dividing it into numbers, words, quoted character strings, and special symbols. All words are then checked against CIGAL's internal lists of command names, function names, and data variables (see NAMES(1), COMMANDS(1), FUNCTIONS(1), and VARIABLES(1)). The parser also checks to see if a word is followed by terms in parentheses. If the word is followed by parentheses, these terms are identified as arguments (in the case of commands or functions) or subscripts (in the case of variables).

Once the entire line has been divided into individual terms, the parser then determines what type of command it is, based on the first term on the line. If the first word is a command name or unrecognized character string, then the line is a standard command. If the first term is a number, data variable, arithmetic operator, or function then the line is treated as an arithmetic expression.

See Also:
CIGAL Home, CIGAL Manual, Topics List, Manual Help

jvs/cigal/manual/chapter1/parser.txt · Last modified: 2023/02/23 18:43 (external edit)