michael@0: #!/bin/bash michael@0: # Copyright (c) 2010 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 GLSL ES parser - glslang_lex.cpp, glslang_tab.h, and glslang_tab.cpp michael@0: michael@0: run_flex() michael@0: { michael@0: input_file=$script_dir/$1.l michael@0: output_source=$script_dir/$1_lex.cpp 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.y michael@0: output_header=$script_dir/$1_tab.h michael@0: output_source=$script_dir/$1_tab.cpp michael@0: bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file michael@0: } michael@0: michael@0: script_dir=$(dirname $0) michael@0: michael@0: # Generate Parser michael@0: run_flex glslang michael@0: run_bison glslang michael@0: patch --silent --forward < 64bit-lexer-safety.patch