• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8/*
9
10    This file is IGNORED during the build process!
11
12    As this file is updated so infrequently and flex is not universally present on build machines,
13    the lex.layout.c file must be manually regenerated if you make any changes to this file. Just
14    run:
15
16        flex layout.flex
17
18    You will have to manually add a copyright notice to the top of lex.layout.c.
19
20*/
21
22%option prefix="layout"
23%option reentrant
24%option yylineno
25%option never-interactive
26%option nounistd
27
28%{
29#include "SkSLToken.h"
30%}
31
32%%
33
34"location"                    { return SkSL::Token::LOCATION; }
35"offset"                      { return SkSL::Token::OFFSET; }
36"binding"                     { return SkSL::Token::BINDING; }
37"index"                       { return SkSL::Token::INDEX; }
38"set"                         { return SkSL::Token::SET; }
39"builtin"                     { return SkSL::Token::BUILTIN; }
40"input_attachment_index"      { return SkSL::Token::INPUT_ATTACHMENT_INDEX; }
41"origin_upper_left"           { return SkSL::Token::ORIGIN_UPPER_LEFT; }
42"override_coverage"           { return SkSL::Token::OVERRIDE_COVERAGE; }
43"blend_support_all_equations" { return SkSL::Token::BLEND_SUPPORT_ALL_EQUATIONS; }
44"push_constant"               { return SkSL::Token::PUSH_CONSTANT; }
45"points"                      { return SkSL::Token::POINTS; }
46"lines"                       { return SkSL::Token::LINES; }
47"line_strip"                  { return SkSL::Token::LINE_STRIP; }
48"lines_adjacency"             { return SkSL::Token::LINES_ADJACENCY; }
49"triangles"                   { return SkSL::Token::TRIANGLES; }
50"triangle_strip"              { return SkSL::Token::TRIANGLE_STRIP; }
51"triangles_adjacency"         { return SkSL::Token::TRIANGLES_ADJACENCY; }
52"max_vertices"                { return SkSL::Token::MAX_VERTICES; }
53"invocations"                 { return SkSL::Token::INVOCATIONS; }
54"when"                        { return SkSL::Token::WHEN; }
55"key"                         { return SkSL::Token::KEY; }
56
57. { return SkSL::Token::INVALID_TOKEN; }
58
59%%
60
61int layoutwrap(yyscan_t scanner) {
62    return 1; // terminate
63}
64