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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2888 - (show annotations) (download) (as text)
Sun Apr 24 18:16:10 2016 UTC (7 years, 11 months ago) by schoenebeck
File MIME type: application/x-sh
File size: 924 byte(s)
* Instrument Scripts: Fixed line numbers on parser error/warning messages.
* Instrument Scripts: Added output of precise column on parser
  error/warning messages.
* Shut up some irrelevant errors of parser generating shell scripts.
* Bumped version (2.0.0.svn6).

1 #!/bin/sh
2 #
3 # Generates the NKSP syntax higlighting scanner's C++ source file
4 # (nksp.cpp in src/scriptvm/editor) according to the NKSP instrument script
5 # regular expressions given by src/scriptvm/editor/nksp.l. This is not used
6 # for the sampler's own instrument parser, but rather to provide syntax
7 # highlighting for NKSP documents for external text editor applications.
8
9 SCRIPTS_DIR=`dirname $0`
10 PARSER_SRC_DIR="$SCRIPTS_DIR/../src/scriptvm/editor"
11
12 echo -n "Searching for lexer..."
13
14 LEX_CMD=NONE
15 if which "flex" > /dev/null; then
16 LEX_CMD=`which flex`
17 elif which "lex" > /dev/null; then
18 LEX_CMD=`which lex`
19 else
20 echo "Error: You need lex (or flex) to generate the NKSP syntax highlighting scanner !"
21 exit -1
22 fi
23
24 echo "OK ($LEX_CMD)"
25
26 echo -n "Generating NKSP editor syntax highlighting scanner ... "
27 (
28 cd $PARSER_SRC_DIR
29
30 $LEX_CMD nksp.l
31 mv -f lex.Nksp_.c nksp.cpp 2>/dev/null
32 )
33 echo "Done"

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC