1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/angle/src/compiler/generate_parser.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 +#!/bin/bash 1.5 +# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. 1.6 +# Use of this source code is governed by a BSD-style license that can be 1.7 +# found in the LICENSE file. 1.8 + 1.9 +# Generates GLSL ES parser - glslang_lex.cpp, glslang_tab.h, and glslang_tab.cpp 1.10 + 1.11 +run_flex() 1.12 +{ 1.13 +input_file=$script_dir/$1.l 1.14 +output_source=$script_dir/$1_lex.cpp 1.15 +flex --noline --nounistd --outfile=$output_source $input_file 1.16 +} 1.17 + 1.18 +run_bison() 1.19 +{ 1.20 +input_file=$script_dir/$1.y 1.21 +output_header=$script_dir/$1_tab.h 1.22 +output_source=$script_dir/$1_tab.cpp 1.23 +bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file 1.24 +} 1.25 + 1.26 +script_dir=$(dirname $0) 1.27 + 1.28 +# Generate Parser 1.29 +run_flex glslang 1.30 +run_bison glslang 1.31 +patch --silent --forward < 64bit-lexer-safety.patch