source: proto/pabloj/trunk/input/test/pabloS/statements/while/while4.pablos @ 2981

Last change on this file since 2981 was 2981, checked in by ksherdy, 6 years ago

Grammar updates. Eliminated optional fw on stream types. Removed typedef.

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