source: proto/pablo/input/test/while2.pablo @ 2361

Last change on this file since 2361 was 2361, checked in by ksherdy, 7 years ago

Updated Pablo grammar and example program fragments.

File size: 392 bytes
RevLine 
[2361]1function void Function(struct TagCallouts tagCallouts, struct Lex lex) {       
2
3        starts_accum = 0;
4        ends_accum = 0;
5       
6        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.