Logiweb(TM)

2.11 Logiweb for user defined syntax

Prev Up Next Page 14 of 800 Search internet


As mentioned, the source of a Logiweb page comprises a header in which the author defines the syntax he or she wants to use and a body in which the author uses the syntax. As an example, the binomial coefficient (( m , n )) is written (( m , n )) in the source of the combinations page. That notation for binomial coefficients is not hardwired into lgs. Rather, the author of the combinations page decided that (( m , n )) was a convenient way of writing a binomial coefficient and then stated that in the header of the source text.

When you write a Logiweb page, you typically build on top of the work of others. You do so by referencing Logiweb pages published by others in the header of your source text. As an example, the combinations page references a page named 'base' which defines e.g. x * y and x div y for multiplication and integer division.

The Logiweb source language defines a syntax for the header. That syntax allows you to define your own syntax which you can then use in the body.

The syntax of the body is defined by the syntax you put in your header plus the syntax defined by the pages you reference plus the syntax of string constants. The syntax of string constants is hardwired into lgs but apart from that the syntax of the body is up to you.

The 'base' page offers 600+ useful constructs, most of which have English sounding names like x factorial and value define x as y end define. But you can write your own base page in Chinese using Chinese characters and then write all your pages in Chinese if you like. Logiweb uses Unicode UTF-8 so you can use whatever Unicodes you like in your source language.

Prev Up Next Page 14 of 800 Search logiweb.eu

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