Edit

kc3-lang/angle/src/compiler/generate_parser.sh

Branch :

  • Show log

    Commit

  • Author : alokp@chromium.org
    Date : 2011-08-14 05:31:22
    Hash : 75fe6b76
    Message : General cleanup of compiler directory and ParseHelper. Review URL: http://codereview.appspot.com/4801084 git-svn-id: https://angleproject.googlecode.com/svn/trunk@730 736b8ea6-26fd-11df-bfd4-992fa37f6226

  • src/compiler/generate_parser.sh
  • #!/bin/bash
    # Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
    # Use of this source code is governed by a BSD-style license that can be
    # found in the LICENSE file.
    
    # Generates GLSL ES parser - glslang_lex.cpp, glslang_tab.h, and glslang_tab.cpp
    
    run_flex()
    {
    input_file=$script_dir/$1.l
    output_source=$script_dir/$1_lex.cpp
    flex --noline --nounistd --outfile=$output_source $input_file
    }
    
    run_bison()
    {
    input_file=$script_dir/$1.y
    output_header=$script_dir/$1_tab.h
    output_source=$script_dir/$1_tab.cpp
    bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file
    }
    
    script_dir=$(dirname $0)
    
    # Generate Parser
    run_flex glslang
    run_bison glslang