/////////////
// Compile
/////////////
flex yell.l
g++ lex.yy.c -ll -Wno-deprecated
////////////
// Yell Source Code (input into our Compiler to transpile to C++ code)
////////////
#include <iostream>
using namespace std;
int main() {
yell <Hello, World!>;
return 0;
}
////////////
// yell.l
////////////
%{
#include <iostream>
#include <stdio.h>
using namespace std;
%}
%%
yell[ ]<.*> { cout << "cout << \"" << yytext + 6 << "\""; }
(.|\n) ECHO; /*matches anything*/
%%
int main(int argc, char **argv)
{
yylex();
return 1;
}