michael@0: #!/bin/bash michael@0: # Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: # Generates various components of GLSL ES preprocessor. michael@0: michael@0: run_flex() michael@0: { michael@0: input_file=$script_dir/$1 michael@0: output_source=$script_dir/$2 michael@0: flex --noline --nounistd --outfile=$output_source $input_file michael@0: } michael@0: michael@0: run_bison() michael@0: { michael@0: input_file=$script_dir/$1 michael@0: output_source=$script_dir/$2 michael@0: bison --no-lines --skeleton=yacc.c --output=$output_source $input_file michael@0: } michael@0: michael@0: script_dir=$(dirname $0) michael@0: michael@0: # Generate preprocessor michael@0: run_flex Tokenizer.l Tokenizer.cpp michael@0: run_bison ExpressionParser.y ExpressionParser.cpp michael@0: patch --silent --forward < 64bit-tokenizer-safety.patch