src/compiler/preprocessor/new/Preprocessor.cpp


Log

Author Commit Date CI Message
alokp@chromium.org d35efdf5 2012-07-03T19:33:10 Restricted the length of identifiers (including #define directive) to 256, as required by webgl spec. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1186 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 2e81891c 2012-06-29T21:26:03 Handled the case where int and float are of correct format, but large. The GLSL spec is not very clear on how integers should be interpreted for expressions. C99 says the expression is of type intmax_t. I am parsing all integers as int except those in expressions, which are being parsed as unsigned int. Review URL: https://codereview.appspot.com/6351051 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1179 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org f115592d 2012-06-28T23:34:30 Used std::ostringstream instead of std::stringstream wherever applicable. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1176 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 5b6a68e0 2012-06-28T20:29:13 Replaced pp::Token::value with pp::Token::text. The term value will be used for a function which will convert text to integer/float constant. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1175 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 432d6fc4 2012-06-27T22:13:21 Introduced preprocessing token types. This fixes a bug where invalid tokens inside excluded conditional block may report diagnostics. Now we let the invalid tokens to bubble through the preprocessor so that they have chance to be skipped. Review URL: https://codereview.appspot.com/6356045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1169 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 73bc298e 2012-06-19T18:48:05 Hooked up the new preprocessor behind a compile-time flag ANGLE_USE_NEW_PREPROCESSOR. Review URL: https://codereview.appspot.com/6304095 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1158 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org f3cdb460 2012-06-19T18:39:48 Added support for pre-defined macros. Review URL: https://codereview.appspot.com/6301084 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1157 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 36124de8 2012-05-24T02:17:43 Implemented #error and #pragma directives. Added new tests and updated old ones for the new preprocessor API. Review URL: https://codereview.appspot.com/6213066 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1094 736b8ea6-26fd-11df-bfd4-992fa37f6226
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 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 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 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 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 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 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