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 37 38
|
/* Generated by re2d */
#line 1 "codegen/d/01_basic_conv.re"
// re2d $INPUT -o $OUTPUT
module main;
bool lex(const(char)* yycursor) {
#line 9 "codegen/d/01_basic_conv.d"
{
byte yych;
yych = cast(byte)*yycursor;
switch (yych) {
case '1': .. case '9': goto yy2;
default: goto yy1;
}
yy1:
++yycursor;
#line 12 "codegen/d/01_basic_conv.re"
{ return false; }
#line 21 "codegen/d/01_basic_conv.d"
yy2:
yych = cast(byte)*++yycursor;
switch (yych) {
case '0': .. case '9': goto yy2;
default: goto yy3;
}
yy3:
#line 11 "codegen/d/01_basic_conv.re"
{ return true; }
#line 31 "codegen/d/01_basic_conv.d"
}
#line 13 "codegen/d/01_basic_conv.re"
}
void main() {
assert(lex("1234"));
}
|