Figure 1

LA home
Computing
Publications
 Comp.J.1985

<program> ::= <statement>

<statement>   ::= begin <stat list> end        |
                  if <exp> then <statement> else <statement> |
                  while <exp> do <statement>   |
                  <ident>:=<exp>               |
                  output <exp>                 |
                  <ident>                      |
                  <dec>

<dec>         ::= var <id list>                |
                  proc <ident> = <statement>

<id list>     ::= <ident>  |  <ident>, <id list>
<stat list>   ::= <statement>  |  <statement>; <stat list>

<exp>         ::= <sexp> <relop> <sexp>  |  <sexp>
<sexp>        ::= <sexp> <addop> <term>  |  <term>
<term>        ::= <term> * <opd>         |  <opd>
<opd>         ::= ( <exp> )  |  <ident>  |  <integer>

<relop>       ::= = | <> | < | <= | > | >=
<addop>       ::= + | -
-- Figure 1. Concrete Syntax --

I.e. The concrete syntax of the demonstration, imperative language being defined. Note that it includes procedure definition and call.

www #ad:

↑ © L. Allison, www.allisons.org/ll/   (or as otherwise indicated).
Created with "vi (Linux)",  charset=iso-8859-1,   fetched Thursday, 25-Apr-2024 23:38:44 UTC.

Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off.