How to code a IF cond ELSE ENDIF block?

Jens Kallup <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
Hello,

like the topic says: How can I code IF ELSE ENDIF statement?

symbol_def_if %= symbol_def_if_inner;
symbol_def_if_inner %=
   (symbol_if > symbol_expr > lit("==") > symbol_expr >> symbol_else >   
symbol_endif ) |
   (symbol_if > symbol_expr > lit("==") > symbol_expr >> symbol_else >> 
*symbol_def_stmts > symbol_endif ) |
   (symbol_if > symbol_expr > lit("==") > symbol_expr >>                
*symbol_def_stmts > symbol_endif ) |
   (symbol_if > symbol_expr > lit("==") > symbol_expr
   >> *symbol_def_stmts >> symbol_else
   >> *symbol_def_stmts >  symbol_endif )
   ;


TIA

Jens


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.