Re: Gelex problem

Thomas Beale <Thomas.Beale-ifdBxBAjbfUj83aOlRudGVaTQe2KTcn/@public.gmane.org> Fri, 11 Oct 2013 19:56:47 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.general
Organization Ocean Informatics
Message-ID <[email protected]>
On 11/10/2013 15:36, Eric Bezault wrote:
> Hi Thomas,
>
> Can you try to write ^[^ \t] at the beginning of the line
> (no indentation)? I suspect that the tab used to indent this
> line is considered as part of the regexp.
>

I just tried that:

<IN_CADL_SECTION>{
^[ \t]+[^\n]*\n {
         io.put_string ("##### matched whitespace non-lf* lf #########%N")
         io.put_string ("%T##### " + text + " #########%N")
                 in_buffer.append_string(text)
                 in_lineno := in_lineno + 1
     }

\n+                in_lineno := in_lineno + text_count

^[^ \t] { -- non-white space at start
         io.put_string ("##### matched non-whitespace at start #########%N")
         io.put_string ("%T##### " + text.item(1).code.out + " #########%N")
                 unread_character(text.item(1))
                 last_token := V_CADL_TEXT
                 create str_.make (in_buffer.count)
                 str_.append_string (in_buffer)
                 in_buffer.wipe_out
                 last_string_value := str_
                 set_start_condition(INITIAL)
     }
}


The result is exactly the same as before - the following gets printed out:

##### matched non-whitespace at start #########
     ##### 32 #########

I'm running out of ideas!

- thomas