File: yc

package info (click to toggle)
libtemplate-perl 2.24-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,660 kB
  • sloc: perl: 14,518; makefile: 15; sh: 5
file content (27 lines) | stat: -rwxr-xr-x 906 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
#========================================================================
#
# yc - yapp compile
#
# This calls 'yapp', distributed with the Parse::Yapp module, to 
# compile the parser grammar and construct the ../Template/Grammar.pm 
# file.  The grammar is defined in ./Parser.yp.  The skeleton file 
# Grammar.pm.skel is used as a template for creating the grammar file.
# An output file 'Parser.output' is generated containing a summary of 
# the rule and state tables.
#
# You only need to run this script if you have changed the grammar and 
# wish to recompile it.
#
# Andy Wardley <abw@wardley.org>
#
#========================================================================

: ${GRAMMAR:="Parser.yp"}
: ${OUTPUT:="../lib/Template/Grammar.pm"}
: ${TEMPLATE:="Grammar.pm.skel"}

echo "Compiling parser grammar (${GRAMMAR} -> ${OUTPUT})"

yapp -v -s -o ${OUTPUT} -t ${TEMPLATE} ${GRAMMAR}