Logiweb(TM)

7.1.2.6 Relation to BNF

Prev Up Next Page 121 of 800 Search internet


Consider the following lgs source:

   ""P my page
   ""D 0 ""n 2 ""n 3 ""n 4
   ""D 2
   " * "
   ""D 6
   " + "
   " - "
   ""B
   2 * 3 - 4

The lgs source defines a syntax class T. In BNF, the definition of T would read:

T ::= my page | 2 | 3 | 4 | T * T | T + T | T - T | S

where S is the syntax class of strings and various escapes that may appear in a body. The body of the page is supposed to be expressed in the given grammar. The body reads

2 * 3 - 4

which indeed belongs to the syntax class T.

Prev Up Next Page 121 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05