source: proto/s2k/trunk/framework/input/test/s2k/statements/while/while4.s2k @ 3767

Last change on this file since 3767 was 3767, checked in by ksherdy, 4 years ago

Replaced function keyword with filter.

File size: 409 bytes
Line 
1filter name(struct TagCallouts tagCallouts, struct Lex lex) {   
2
3        stream<1> starts_accum = 0;
4        stream<1> ends_accum = 0;       
5        stream<1> cursor = pablo.ScanToFirst(lex.opener);
6       
7        while (cursor) {
8                starts_accum |= cursor;
9                cursor = pablo.ScanTo(cursor, lex.marker &~ cursor);
10                ends_accum |= cursor;
11                cursor = pablo.ScanTo(cursor, (lex.marker | lex.terminator) &~ cursor);
12                cursor = cursor & lex.marker;
13        }
14};
Note: See TracBrowser for help on using the repository browser.