Commit Graph
47 Commits
Author SHA1 Message Date
josh 584fdae2ba set token text to string literal value for string literal tokens 2018-05-08 20:26:34 -04:00
josh 051dd9b9c1 fix indentation 2018-05-08 20:21:29 -04:00
josh 24f18c5233 remove String module; use std::string 2018-05-08 20:13:47 -04:00
josh accaed47bc add infrastructure to keep track of observed type names in the future 2018-05-08 20:03:20 -04:00
josh 07fb50bb86 convert main module to a C++ module 2018-05-08 19:59:57 -04:00
josh 8733911e82 support C++ in build 2018-05-08 19:55:40 -04:00
josh 600d01193c update to waf 2.0.7 2018-05-08 19:36:16 -04:00
josh 895ea27016 parser rewrite according to ANSI C grammar
same problem as before - conflict in IDENTIFIER as a type name versus an actual identifier
2018-05-07 23:48:08 -04:00
josh a7d63e51e5 rewrite parser with C Syntax BNF file 2018-05-07 23:21:25 -04:00
josh e7835b4fac start rewriting grammar 2018-04-24 21:10:48 -04:00
josh 89e003b330 another fix to error location reporting 2018-04-24 21:05:33 -04:00
josh 3cd2d96611 Display original source file location for errors 2018-04-23 23:51:35 -04:00
josh 49afce6095 use last_column instead of first_column for error column tracking 2018-04-23 23:26:43 -04:00
josh 45de80c852 show source line on error 2018-04-23 23:11:34 -04:00
josh fc5dfb7744 move C code out of parser.y to parser.c 2018-04-23 22:48:59 -04:00
josh 8db0a47fb4 remove user_action() prototype 2018-04-23 22:25:13 -04:00
josh 57dcf9e62d create token nodes in lexer 2018-04-21 23:37:35 -04:00
josh 89889b778f Add Node module 2018-04-18 21:16:32 -04:00
josh 866dd42196 use %option noyywrap 2018-04-18 20:46:14 -04:00
josh b2072de717 Keep track of line number and filename from preprocessor output for error messages 2018-04-18 20:10:23 -04:00
josh 74031d18d7 add String_new_size() 2018-04-18 19:59:32 -04:00
josh 3508deecc5 finish adding grammar 2018-04-13 22:16:07 -04:00
josh 9d2c41edc1 Start adding some grammar definition 2018-04-11 22:05:39 -04:00
josh 50480d80b4 simpler octal escape pattern 2018-04-11 21:39:21 -04:00
josh 5615c5781d allow hexadecimal and octal escapes within character constants 2018-04-11 21:38:58 -04:00
josh 090521a805 allow leading "L" prefix for string constants 2018-04-11 21:36:15 -04:00
josh 3170f0870c add octal escape in string 2018-04-11 21:35:03 -04:00
josh 81614c41ab support all C character escape sequences 2018-04-11 21:29:18 -04:00
josh 4ffc67919e allow "L" prefix for character constants 2018-04-11 21:28:13 -04:00
josh e51103149b fix floating point suffix 2018-04-11 21:25:37 -04:00
josh 7149e3c5e3 allow sign after "e" in floating point constant 2018-04-11 21:24:13 -04:00
josh 21a42232f0 allow "nn." or ".nn" for floating point numbers 2018-04-11 21:20:20 -04:00
josh 75bda2b8ac allow float constants to have "e" suffix 2018-04-11 21:18:21 -04:00
josh 14bb4f4705 add more tokens 2018-04-10 21:23:03 -04:00
josh bd220b9b14 Parse after preprocessing 2018-04-07 11:17:28 -04:00
josh a87b938234 Add some temporary code to preprocess with gcc -E 2018-04-07 11:06:47 -04:00
josh 19c61a91fe add parse() 2018-04-07 10:06:49 -04:00
josh 6422e8d145 ignore whitespace 2018-04-07 09:35:59 -04:00
josh c6f5200e69 Terminate String memory with '\0' 2018-04-07 09:34:25 -04:00
josh 49e4e853be Don't forget to BEGIN(INITIAL) when terminating a string 2018-04-07 09:31:10 -04:00
josh aaf47bf934 Build a String value in the lexer for string constants 2018-04-07 09:26:39 -04:00
josh 961b3297f5 Add String module 2018-04-07 09:14:26 -04:00
josh 7107699bc5 Capture preprocessor-output lines and EOLs 2018-04-07 08:38:30 -04:00
josh 47bb3f5219 Add lexer tokens for integer, float, string constants and identifiers 2018-04-07 08:27:35 -04:00
josh 8795d30953 add some C keyword tokens 2018-04-06 12:03:17 -04:00
josh 3ead22e0cf add initial empty C, flex, and bison sources 2018-04-06 11:38:27 -04:00
josh 8d8c08cd85 Add waf, configure, Makefile, empty wscript 2018-04-06 10:58:29 -04:00