delimiter match buffer

Nick Rodie
  • Nick Rodie

    Nick Rodie - 2009-03-11

    Hello and help!

    It seems to me that the '&' delimiter match will always be called first when present in a section. Is this correct?, if so its a bug aint it? What I need is to be able to execute call_first somehow.

    < eg. where file contains nothing but 'aaaaaaaaa' this example will always go Bad >

    =Idle white
    =Good green
    =Bad red

    :reset Idle
    *    delim_test    noeat save_c

    :delim_test Idle
    *    delim_test
    &    call_second
    "a"  call_first

    :call_first Good
    *       call_first

    :call_second Bad
    *       call_second

    • Nick Rodie

      Nick Rodie - 2009-03-11

      Doh forgot to mention the obvious.. Please help with *.jsf syntax

    • Charles J. Tabony

      Hmm.  The implementation does not "remember" the order of the transitions after they have been parsed.  For literal characters, it constructs a table that maps characters to commands.  Latter transitions that match literal characters override previous ones.  That is why the * transition should be listed first, since it is shorthand for all literal characters.  However, a transition for a delimiter match is recorded separately from the transitions for literal characters.  No information is recorded about where it appeared in the list of transitions.  It would be possible to add a bit to each command indicating whether it appeared in the transition list before or after a transition for a delimiter match.

      Right now, as you say, if a delimiter match is found, the corresponding transition is taken regardless of the order the transitions were listed.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks