Language Design

languagedesign

Some proposed changes to FunnelWeb do not correspond to any particular component of FunnelWeb and are really to do with the design of the input language.

Output or file?: The @O special sequence for defining an output file is somewhat non-mnemonic and can be confused with zero (0). Perhaps it should be replaced by the @F sequence.

Syntax of section names: Currently section names use the same syntax as macro names. For example @<Sloth@>. It can be argued that angle brackets should be reserved only for macro names and that some other syntax should be found for delimiting section names. This is not a clear issue. It could also be argued that they are both names, and that because sections can inherit their names from the macros they contain, that the names are of the same type.sectionsyntax

One macro per section: One particular style of using FunnelWeb is to have at most one macro definition per section. It may be worth adding a pragma that instructs FunnelWeb to enforce this.

Should @{ suppress EOL?: When defining a macro in FunnelWeb, it seems to be rule rather than the exception that the @{ be followed by @-. This suppresses the EOL on the definition line, allowing the first line of the macro to be placed immediately above and in line with the other lines without introducing an EOL at the start of the macro text. One option is to introduce a pragma to determine whether to suppress EOLs following @{.

Pragma syntax: It is not clear how loose the syntax of pragmas should be. Perhaps they should be case insensitive.pragmasyntax

Conditionals: Depending on demand, it may be worth reintroducing some sort of conditional feature into FunnelWeb. However, it would have to be very simple to compete with the various ways in which conditionals can already be fudged within FunnelWeb as it stands.conditionals

File markers: It might be worth modifying the language so that a special syntactical marker is required at the start and end of files. This will assist in detecting truncations and other corruptions.filemarkers

Formal parameter lists: It might be worth changing over to a syntax for formal parameter lists that does not require the @( and @). However, they could be retained as optional for backward compatibility.parameter listformal