1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/angle/src/compiler/preprocessor/generate_parser.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,27 @@ 1.4 +#!/bin/bash 1.5 +# Copyright (c) 2012 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 various components of GLSL ES preprocessor. 1.10 + 1.11 +run_flex() 1.12 +{ 1.13 +input_file=$script_dir/$1 1.14 +output_source=$script_dir/$2 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 1.21 +output_source=$script_dir/$2 1.22 +bison --no-lines --skeleton=yacc.c --output=$output_source $input_file 1.23 +} 1.24 + 1.25 +script_dir=$(dirname $0) 1.26 + 1.27 +# Generate preprocessor 1.28 +run_flex Tokenizer.l Tokenizer.cpp 1.29 +run_bison ExpressionParser.y ExpressionParser.cpp 1.30 +patch --silent --forward < 64bit-tokenizer-safety.patch