Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • tests
  • preprocessor_tests
  • if_test.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Make preprocessor ExpressionParser only lex what it can parse · 3187a38e
    Olli Etuaho authored Sep 09, 2015
    This cleans up ExpressionParser so that the lexer only consumes one extra
    token in case the parser finishes. The parser will also finish with
    YYACCEPT once it has parsed a complete expression. This will make the
    preprocessor to generate a more informative unexpected token error
    instead of a syntax error if there are extra tokens after #if.
    
    This will also enable reusing ExpressionParser for parsing expressions in
    line directives. The format for a line directive that specifies both line
    and file numbers is as follows:
    
     #if line-expression file_expression
    
    ExpressionParser will need to be run twice for each line: first to parse
    line-expression and then to parse file-expression. For that reason, it is
    essential that ExpressionParser for line-expression stops before
    consuming more than one token of file-expression.
    
    BUG=angleproject:989
    TEST=angle_unittests, dEQP-GLES3.functional.shaders.preprocessor.*
    
    Change-Id: I0bb92f733c18891eeddbc61e7c5bebdf1003559a
    Reviewed-on: https://chromium-review.googlesource.com/300962Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
    Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
    3187a38e
if_test.cpp 26.1 KB
EditWeb IDE
×

Replace if_test.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.