%{
#include <stdio.h>
%}
%%
hello
{ printf
("World\n"
); } // When "hello"
is matched
, print "World"
.|\n
{ ECHO
; } // For any other input
, print as
is %%
int main() {
yylex(); // Start the lexer
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQpoZWxsbyAgIHsgcHJpbnRmKCJXb3JsZFxuIik7IH0gICAgLy8gV2hlbiAiaGVsbG8iIGlzIG1hdGNoZWQsIHByaW50ICJXb3JsZCIKLnxcbiAgICB7IEVDSE87IH0gICAgICAgICAgICAgICAgICAvLyBGb3IgYW55IG90aGVyIGlucHV0LCBwcmludCBhcyBpcwolJSAKCmludCBtYWluKCkgewogICAgeXlsZXgoKTsgLy8gU3RhcnQgdGhlIGxleGVyCiAgICByZXR1cm4gMDsKfQo=