Re: execute/parse IF ELSE ENDIF

Larry Evans <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 02/05/2017 03:17 PM, Jens Kallup wrote:
> Hello,
> 
> is it possible to parse the construct: IF stmts *ELSE stmts ENDIF

Don't you mean, using "somewhat" spirit syntax:

  stmt = if_stmt | ... ;
  stmts = *stmt ;
  if_stmt = IF >> stmts >> *(ELSE stmts) >> ENDIF ;

?

> in the form, that the dangling else problem is solved, and the parse code
> can be execute on the fly by condition's?
> 
> Thanks for helping
> Jens
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
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.