src/compiler/preprocessor/new


Log

Author Commit Date CI Message
alokp@chromium.org 98d04ec8 2012-05-21T22:47:20 Implemented #define and #undef directives. Review URL: https://codereview.appspot.com/6215072 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1092 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 0eb51ac3 2012-05-21T21:43:57 Deleted old unused files. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1091 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 964b7194 2012-05-17T21:12:27 Fixed compile error in lexer_glue.cpp. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1089 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 99b5c0c9 2012-05-17T20:44:52 Fixed compile errors and warnings on linux. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1088 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 2c958eef 2012-05-17T20:35:42 Moved error-handling to a separate class - Diagnostics. We were earlier returning errors as tokens which did not work very well when error occured while parsing a preprocessor directive. Now all returned tokens are valid. Errors are reported via an abstract Diagnostics interface. Updated unit-tests with the new scheme. Review URL: https://codereview.appspot.com/6203089 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1087 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 04d7d22b 2012-05-16T19:24:07 Reafactored Lexer class to allow chaining. The full chain when parsing #if directive looks like this: Preprocessor -> MacroExpander -> DirectiveHandler -> MacroExpander -> DefinedFilter -> Tokenizer. This chain dynamically changes depending on the current context. Also added an incomplete implementation of #if handling and ExpressionParser to illustrate how this design is supposed to work. Review URL: https://codereview.appspot.com/6203060 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1084 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 30a487c7 2012-05-02T17:30:46 Minor refactoring for Input class. Chnaged a raw array to std::vector. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1068 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 98eec912 2012-05-01T10:04:08 Using yy_scan_string, which flushes the old buffer does not work. GLSL requires that each input string is concatenated, but yy_scan_string treats each string individually. Added a custom YY_INPUT which maintains the continuity between each string. Review URL: https://codereview.appspot.com/6130045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1066 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org a11a6ab8 2012-04-27T10:00:38 Changes to handle comments properly and associated tests. Review URL: https://codereview.appspot.com/6111059 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1059 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 128d9199 2012-04-26T22:39:21 Added tests for token location. Review URL: https://codereview.appspot.com/6118062 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1058 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ef1eaa04 2012-04-26T18:02:42 Changed Token::Location::string to Token::Location::file to keep it consistent with __FILE__ inbult macro. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1055 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 85f2b2c5 2012-04-25T06:06:33 Added rules for ignoring comments. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1053 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 28182485 2012-04-24T23:07:34 Drastically simplified Input class. Now most of the heavy lifting is done by in-built yy_scan_string and yy_scan_bytes. Comment handling will be done by the lexer. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1051 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d08bb0cc 2012-04-23T19:27:13 The default implementation in flex only handles LF characters. GLSL supports all three newline characters - LF, CR, and CR+LF. Use a custom newline handler. Review URL: https://codereview.appspot.com/6105045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1049 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 036a7356 2012-04-20T22:34:53 Do not return newline and number sign. They are for internal purposes only. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1048 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 78a35198 2012-04-19T17:16:26 Added a catch-rule for invalid numbers. Note that we do not need such a rule for identifiers because they will always be either terminated by a space, a punctuator, or an invalid character. Space and punctuator are both valid cases. The invalid character will be caught by another rule specifically for invalid characters. I will cover this case when I add tests for valid character set. Review URL: https://codereview.appspot.com/5978048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1047 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com aeba7b89 2012-04-17T23:25:10 Build fix for chromeos. BUG= TEST=chromeos bots compile when we roll ANGLE TBR=alokp git-svn-id: https://angleproject.googlecode.com/svn/trunk@1046 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 320c5d7f 2012-04-13T21:32:35 Minor formatting change in pp.l. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1039 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d089d118 2012-04-13T17:05:12 Removed unnecessary includion of Token.h in various files. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1037 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com 5e75f344 2012-04-12T23:47:10 Mac/Linux build fix. BUG= TEST=compile fine TBR=alokp Review URL: https://codereview.appspot.com/6013048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1035 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 14e966b2 2012-04-12T20:57:53 Modified the interface of Preprocessor. Added it to the build file. Lexer changes to record leading space. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1033 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 40da4c53 2012-04-12T05:23:19 Added HAS_LEADING_SPACE flag to pp::Token. Split the new preprocessor into a separate target. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1032 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ff6a0a5c 2012-04-03T21:03:02 Fixed line number reporting. Each newline was being counted twice. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1015 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 3f990c4a 2012-04-03T19:50:35 Added lexer rules for operators. Review URL: https://codereview.appspot.com/5966072 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1014 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 4b2a522a 2012-04-03T17:19:42 Punted on bison parser. It was turning out to be more complicated than necessary. Manual parsing combined with a flex lexer is easier. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1012 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 01fd431c 2012-03-30T21:33:30 More prep work for macro expansion. Off-loaded lexing from Context class to a new Lexer class. Review URL: https://codereview.appspot.com/5059048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1011 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 16efbbae 2011-09-13T04:10:41 Complete implementation for handling #define directive. Review URL: http://codereview.appspot.com/4963062 git-svn-id: https://angleproject.googlecode.com/svn/trunk@752 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 3a01d1bc 2011-08-30T05:10:53 Preparation for macro expansion. Review URL: http://codereview.appspot.com/4919045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@741 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org b81c401d 2011-08-21T06:53:11 Modified Token class to store various types of data. Added debug code to dump token to an output stream. Review URL: http://codereview.appspot.com/4920041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@737 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 4e4b807d 2011-08-07T05:36:04 Beginnings of a new preprocessor. Review URL: http://codereview.appspot.com/4830050 git-svn-id: https://angleproject.googlecode.com/svn/trunk@718 736b8ea6-26fd-11df-bfd4-992fa37f6226