diff options
| Commit | eddc31d42bce24b97e18e8ed765888af7ddbb44f (patch) | |
|---|---|---|
| Author | 2018-10-10 21:30:02 +0300 | |
| Committer | 2018-10-10 21:30:02 +0300 | |
| Files | e61d773fbc95e9e87e38a4ed4be651afc978faf7 | |
| IPL-eddc31d42bce24b97e18e8ed765888af7ddbb44f.tar IPL-eddc31d42bce24b97e18e8ed765888af7ddbb44f.tar.gz IPL-eddc31d42bce24b97e18e8ed765888af7ddbb44f.zip | ||
| Parent | a6a0184c1c9d32f27beb4a0a4f19ab2ce429d31f (diff) | |
Windows build for the flex demo files
5 files changed, 46 insertions, 0 deletions
| -rw-r--r-- | demo/flex/JavaScript.flex | 1 | ||||
| -rw-r--r-- | demo/flex/genie.lua | 41 | ||||
| -rw-r--r-- | demo/flex/js2html.c | 1 | ||||
| -rw-r--r-- | demo/flex/js2html.flex | 1 | ||||
| -rw-r--r-- | demo/flex/lex.yy.c | 2 |
diff --git a/demo/flex/JavaScript.flex b/demo/flex/JavaScript.flex index 4df5ca3..7f447b5 100644 --- a/demo/flex/JavaScript.flex +++ b/demo/flex/JavaScript.flex @@ -3,6 +3,7 @@ %{ /* need this for the call to atof() below */ #include <math.h> +#define YY_NO_UNISTD_H %} DIGIT [0-9] diff --git a/demo/flex/genie.lua b/demo/flex/genie.lua new file mode 100644 index 0000000..44b76b4 --- /dev/null +++ b/demo/flex/genie.lua @@ -0,0 +1,41 @@ +solution 'FlexDemos' + configurations {'debug', 'release'} + configuration 'Linux' + flags { + 'FatalWarnings', + 'ExtraWarnings', + 'Cpp14', + } + configuration '*' + + local root = 'build/' + + + configuration 'debug' + targetdir(root .. 'bin/debug') + objdir(root .. 'obj/debug') + + configuration 'release' + targetdir(root .. 'bin/release') + objdir(root .. 'obj/release') + configuration '*' + + project 'FlexLexer' + kind 'ConsoleApp' + language 'C' + uuid(os.uuid('FlexLexer')) + files { + 'lex.yy.c', + 'JavaScript.flex', + } + debugargs 'hello.js' + + project 'js2html' + kind 'ConsoleApp' + language 'C' + uuid(os.uuid('js2html')) + files { + 'js2html.c', + 'js2html.flex', + } + debugargs 'hello.js' diff --git a/demo/flex/js2html.c b/demo/flex/js2html.c index 821e06d..00d10c6 100644 --- a/demo/flex/js2html.c +++ b/demo/flex/js2html.c @@ -529,6 +529,7 @@ int yy_flex_debug = 0; char *yytext; #line 1 "js2html.flex" /* scanner for a toy JavaScript-like language */ +#define YY_NO_UNISTD_H #line 4 "js2html.flex" #line 534 "js2html.c" diff --git a/demo/flex/js2html.flex b/demo/flex/js2html.flex index 738895e..4dfe28a 100644 --- a/demo/flex/js2html.flex +++ b/demo/flex/js2html.flex @@ -1,6 +1,7 @@ /* scanner for a toy JavaScript-like language */ %{ +#define YY_NO_UNISTD_H %} DIGIT [0-9] diff --git a/demo/flex/lex.yy.c b/demo/flex/lex.yy.c index fd2982d..7abfcd2 100644 --- a/demo/flex/lex.yy.c +++ b/demo/flex/lex.yy.c @@ -531,6 +531,8 @@ char *yytext; #line 4 "JavaScript.flex" /* need this for the call to atof() below */ #include <math.h> +#define YY_NO_UNISTD_H +//int isatty(int) { return 0; } #line 535 "lex.yy.c" #define INITIAL 0 |
