File: rebuild-grammar.pl

package info (click to toggle)
libcss-perl 1.08-1%2Bnmu3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 976 kB
  • sloc: perl: 13,816; makefile: 16
file content (17 lines) | stat: -rw-r--r-- 560 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

# taken from
# https://rt.cpan.org/Ticket/Attachment/735088/379845/build-grammar.pl
# and
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569404#17

use Parse::RecDescent;
use CSS::Parse::PRDGrammar;

$Parse::RecDescent::skip = '';
$::RD_AUTOACTION         = 'print "token: ".shift @item; print " : @item\n"';
Parse::RecDescent->Precompile( $CSS::Parse::PRDGrammar::GRAMMAR,
    "CSS::Parse::CompiledGrammar" )
    or die("precompile failed");
rename( "CompiledGrammar.pm", "CSS/Parse/CompiledGrammar.pm" )
    or die("rename failed: $!");