aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/layout.flex
blob: 4e6695cfdc974f58cfec846e73ff61af9ddc70b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/*

    This file is IGNORED during the build process!

    As this file is updated so infrequently and flex is not universally present on build machines,
    the lex.layout.c file must be manually regenerated if you make any changes to this file. Just
    run:

        flex layout.flex

    You will have to manually add a copyright notice to the top of lex.layout.c.

*/

%option prefix="layout"
%option reentrant
%option yylineno
%option never-interactive
%option nounistd

%{
#include "SkSLToken.h"
%}

%%

"location"                    { return SkSL::Token::LOCATION; }
"offset"                      { return SkSL::Token::OFFSET; }
"binding"                     { return SkSL::Token::BINDING; }
"index"                       { return SkSL::Token::INDEX; }
"set"                         { return SkSL::Token::SET; }
"builtin"                     { return SkSL::Token::BUILTIN; }
"input_attachment_index"      { return SkSL::Token::INPUT_ATTACHMENT_INDEX; }
"origin_upper_left"           { return SkSL::Token::ORIGIN_UPPER_LEFT; }
"override_coverage"           { return SkSL::Token::OVERRIDE_COVERAGE; }
"blend_support_all_equations" { return SkSL::Token::BLEND_SUPPORT_ALL_EQUATIONS; }
"push_constant"               { return SkSL::Token::PUSH_CONSTANT; }
"points"                      { return SkSL::Token::POINTS; }
"lines"                       { return SkSL::Token::LINES; }
"line_strip"                  { return SkSL::Token::LINE_STRIP; }
"lines_adjacency"             { return SkSL::Token::LINES_ADJACENCY; }
"triangles"                   { return SkSL::Token::TRIANGLES; }
"triangle_strip"              { return SkSL::Token::TRIANGLE_STRIP; }
"triangles_adjacency"         { return SkSL::Token::TRIANGLES_ADJACENCY; }
"max_vertices"                { return SkSL::Token::MAX_VERTICES; }
"invocations"                 { return SkSL::Token::INVOCATIONS; }
"when"                        { return SkSL::Token::WHEN; }
"key"                         { return SkSL::Token::KEY; }

. { return SkSL::Token::INVALID_TOKEN; }

%%

int layoutwrap(yyscan_t scanner) {
    return 1; // terminate
}