On 3 Jun 98 at 11:34, Miklos Cserzo wrote:
do
SYNTAX: for iteration_variable := initial_value to final_value do statement
or for iteration_variable := initial_value downto final_value do statement
or
while boolean_expression do statement
or
with list_element[,...] do statement
If we are going to supply syntax to Pascal constructs then I suggest that they are suppled as proper grammar i.e. the LALR(1) format.
Nick.
Miklos Cserzo wrote:
SYNTAX: for iteration_variable := initial_value to final_value do statement [...]
Nick Burrett wrote:
If we are going to supply syntax to Pascal constructs then I suggest that they are suppled as proper grammar i.e. the LALR(1) format.
I am not convinced that a formal description helps programmers better to understand the syntax of Pascal constructs than an example-like description as Miklos provided. At least when I am trying to get into a new language, I look at the examples first and at the formal description last.
Those who are interested in the exact grammar of GNU Pascal can look it up from the Bison source code of the parser, `parse.y'. In `info -f gpc -n "Language Definition"' I am trying to explain, how to do that.
Peter
`info -f gpc -n "Language Definition"' I am trying to explain, how to do that.
No: info -f gpc -n "Language definition" with a lower case ! Any way to make this case independant ?
According to Maurice Lombardi:
`info -f gpc -n "Language Definition"' I am trying to explain, how to do that.
No: info -f gpc -n "Language definition" with a lower case ! Any way to make this case independant ?
No, AFAIK. :-(
Peter