File: 01_basic_s.d

package info (click to toggle)
re2c 4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 50,052 kB
  • sloc: cpp: 32,477; ml: 8,279; sh: 5,265; makefile: 968; haskell: 612; python: 428; ansic: 227; javascript: 111; java: 3
file content (36 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* Generated by re2d */
#line 1 "codegen/d/01_basic_s.re"
// re2d $INPUT -o $OUTPUT -s
module main;

bool lex(const char *s) {
    size_t cursor;
    
#line 10 "codegen/d/01_basic_s.d"
{
    char yych;
    yych = s[cursor];
    if (yych <= '0') goto yy1;
    if (yych <= '9') goto yy2;
yy1:
    ++cursor;
#line 15 "codegen/d/01_basic_s.re"
    { return false; }
#line 20 "codegen/d/01_basic_s.d"
yy2:
    ++cursor;
    yych = s[cursor];
    if (yych <= '/') goto yy3;
    if (yych <= '9') goto yy2;
yy3:
#line 14 "codegen/d/01_basic_s.re"
    { return true; }
#line 29 "codegen/d/01_basic_s.d"
}
#line 16 "codegen/d/01_basic_s.re"

}

void main() {
    assert(lex("1234"));
}