/[svn]/linuxsampler/trunk/scripts/generate_instrument_script_parser.sh
ViewVC logotype

Contents of /linuxsampler/trunk/scripts/generate_instrument_script_parser.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1216 - (show annotations) (download) (as text)
Fri Jun 1 15:50:38 2007 UTC (16 years, 10 months ago) by schoenebeck
Original Path: linuxsampler/trunk/scripts/generate_parser.sh
File MIME type: application/x-sh
File size: 857 byte(s)
* a pregenerated LSCP parser is no longer kept in CVS, from now on you
  need to have bison (or another yacc-compatible parser generator)
  installed to be able to compile LS from CVS

1 #!/bin/sh
2 #
3 # Generates the LSCP parser's C++ source files (src/network/lscpparser.cpp and
4 # src/network/lscpsymbols.h) according to the LSCP (BNF) grammar definition
5 # given by src/network/lscp.y
6
7 SCRIPTS_DIR=`dirname $0`
8 NETWORK_SRC_DIR="$SCRIPTS_DIR/../src/network"
9
10 echo -n "Searching for a parser generator..."
11 YACC_CMD=NONE
12 if which "bison" > /dev/null; then
13 YACC_CMD="`which bison` -y"
14 elif which "yacc" > /dev/null; then
15 YACC_CMD=`which yacc`
16 else
17 echo "Error: You need yacc (or bison) to generate the LSCP parser !"
18 exit -1
19 fi
20 echo "OK ($YACC_CMD)"
21
22 echo "Generating LSCP parser..."
23 (
24 cd $NETWORK_SRC_DIR
25 $YACC_CMD -d lscp.y
26 $YACC_CMD lscp.y
27 mv -f y.tab.h lscpsymbols.h
28 mv -f y.tab.c lscpparser.cpp
29 )
30 echo "Done"
31
32 echo -n "Updating Documentation/lscp.xml..."
33 (cd $SCRIPTS_DIR && ./update_grammar.pl)
34 echo "Done"

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC