BASIC DEFINITIONS FOR A PARSER - PROGRAM CONVERTER
for NATURAL to JAVAJ2EE program conversion
by Ali Riza SARAL
Line is a string of characters that and with ‘\n’. A line may be comprised of program code and comments… NATURAL language requires that a comment line’s 7th char is ‘*’. So it begins with ‘*’ instead of a natural command or its parameter etc…
A statement is a group of tokens that comprise a characteristic token that specifies the Statement. Other tokens may be keywords that indicate the parameters that follow them. This is a multi-line statement.
A statement may continue for more than one line. Its tokens may be places on more than one line.
A keyword may not be divided on more than one line.
A parameter may be a variable name, a constant or a calculation formula. A calculation formula may be divided on more than one line.
A single line may include more than one statement. This is a multi-statement line.