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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2581 - (show annotations) (download) (as text)
Fri May 30 12:48:05 2014 UTC (9 years, 10 months ago) by schoenebeck
File MIME type: application/x-sh
File size: 992 byte(s)
* (WIP) Implemented parser and VM for upcoming new real-time instrument
  script support. It needs yet to be integrated into the sampler's
  sampler engines. You can toy around for now with the command line tool
  "ls_instr_script" and i.e. examples showing the core language features
  under src/scriptvm/examples/.
* Bumped version (1.0.0.svn41).

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_lscp_grammar.pl)
34 echo "Done"
35
36 echo -n "Generating src/network/lscp_shell_reference.cpp..."
37 (cd $SCRIPTS_DIR && ./generate_lscp_shell_reference.pl)
38 echo "Done"

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC