• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# Generates GLSL ES parser - glslang_lex.cpp, glslang_tab.h, and glslang_tab.cpp
7
8run_flex()
9{
10input_file=$script_dir/$1.l
11output_source=$script_dir/$1_lex.cpp
12flex --noline --nounistd --outfile=$output_source $input_file
13}
14
15run_bison()
16{
17input_file=$script_dir/$1.y
18output_header=$script_dir/$1_tab.h
19output_source=$script_dir/$1_tab.cpp
20bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file
21}
22
23script_dir=$(dirname $0)
24
25# Generate Parser
26run_flex glslang
27run_bison glslang
28patch --silent --forward < 64bit-lexer-safety.patch
29