Check-in Number:
|
1360 | |
Date: |
2001-Nov-17 00:00:47 (local)
2001-Nov-16 23:00:47 (UTC) |
User: | rse |
Branch: | |
Comment: |
Birthday commit:
Shorten grammar to the usual BNF notation and add an example. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/l2/l2.pod 1.9 -> 1.10
--- l2.pod 2001/11/15 09:47:32 1.9
+++ l2.pod 2001/11/16 23:00:47 1.10
@@ -73,57 +73,44 @@
and takes less coding effort. The channel definition language is almost
always sufficient for an application using L2.
-=head1 L2 CHANNEL DEFINITION EBNF GRAMMAR
+=head1 CHANNEL TREE SPECIFICATION
-/* channel tree */
-tree : stream
- ;
-
-/* stream of channels */
-stream : channel
- | channel T_OP_ARROW stream
- | channel T_OP_ARROW '{' streams '}'
- ;
-
-/* list of sibling streams */
-streams : stream
- | stream ';' streams
- ;
-
-/* channel */
-channel : channel_level '/' channel_level ':' channel_cons
- | channel_level ':' channel_cons
- | channel_cons
- ;
-
-/* channel level */
-channel_level : T_ID
- | '(' channel_level_mask ')'
- ;
-
-/* channel level mask */
-channel_level_mask : T_ID
- | T_ID '|' channel_level_mask
- ;
-
-/* channel constructor */
-channel_cons : T_ID channel_params
- ;
-
-/* channel parameters */
-channel_params : /* empty */
- | '(' channel_param_list ')'
- ;
-
-/* channel parameter list */
-channel_param_list : /* empty */
- | channel_param
- | channel_param ',' channel_param_list
- ;
-
-/* channel parameter */
-channel_param : T_ID '=' T_PARAM
- ;
+An L2 channel tree can be descriped by a textual specification according
+to the following Backus-Naur-Form (BNF):
+
+ tree ::= stream
+ stream ::= channel
+ | channel "->" stream
+ | channel "->" "{" streams "}"
+ streams ::= stream
+ | stream ";" streams
+ channel ::= channel_level "/" channel_level ":" channel_cons
+ | channel_level ":" channel_cons
+ | channel_cons
+ channel_level ::= IDENTIFIER
+ | "(" channel_level_mask ")"
+ channel_level_mask ::= IDENTIFIER
+ | IDENTIFIER "|" channel_level_mask
+ channel_cons ::= IDENTIFIER channel_params
+ channel_params ::= EMPTY
+ | "(" channel_param_list ")"
+ channel_param_list ::= EMPTY
+ | channel_param
+ | channel_param "," channel_param_list
+ channel_param ::= IDENTIFIER "=" PARAMETER
+
+An example of such a channel tree specification is:
+
+ noop -> {
+ debug: prefix(prefix="[%d-%m-%Y/%H:%M:%S] ")
+ -> buffer(size=16384)
+ -> file(path=foo.log, append=1);
+ error: syslog(ident=foo, facility=user,
+ remotehost=syslog.example.com,
+ target=remote);
+ panic: smtp(host=mail.example.com,
+ rcpt=foo@example.com);
+ }
=head1 FUNCTIONS
|
|