I propose the following constructions to specify the syntax of a "simple"meta:

1/ as for a type, different successive parts of a syntax are given sequentially,with the keyword indicated first2/ to specify non exclusive optional indications, use "optional" withdifferent option syntax indented3/ to specify exclusive optional indication, use "exclusive" with a selectorand different option syntax indented4/ to specify a sequence of 0 or more things, use "sequence"5/ simple arguments are declared with "arg" - "constant" may be used to declare a constant argument - the type should be provided, or "any" should be typed instead with an optional argument to receive the actual type (argument is compiled) or expression (to avoid compilation)

keyword 'key' followed by a Str keyword 'key2' followed by an Int and, optionaly, by one of the following: keyword 'subkey1' followed by 2 Ints (which is the default, with values 0 and 1) keyword 'subkey2' followed by some Float values (stop when arg may not be casted to Float anymore or end of expression is reached, or ??)last, an expression

I don't know if this syntax is general enough.The aim of some extended syntax (even if there are some shortcutsto write simple syntax as you say) is to make it possible to documenta broad range of meta in a common way, and even to specify some general"prototypes".

Message posted by maybe pom on2002/05/10 17:22:11

Actually, the aim is to create some general prototype and some "recursive"parsing function for expressions.