migrate substitution keywords to SVN
[reactos.git] / reactos / lib / kjs / src / make-op-def.pl
1 #!/usr/local/bin/perl -w
2 #
3 # Opcode extractor.
4 # Copyright (c) 1997-1998 New Generation Software (NGS) Oy
5 #
6 # Author: Markku Rossi <mtr@ngs.fi>
7 #
8
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Library General Public
12 # License as published by the Free Software Foundation; either
13 # version 2 of the License, or (at your option) any later version.
14 #
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Library General Public License for more details.
19 #
20 # You should have received a copy of the GNU Library General Public
21 # License along with this library; if not, write to the Free
22 # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 # MA 02111-1307, USA
24 #
25 #
26 #
27 # $Source: /cygdrive/c/RCVS/CVS/ReactOS/reactos/lib/kjs/src/make-op-def.pl,v $
28 # $Id$
29 #
30
31 $opcount = 0;
32
33 print "# name \topcode\tdatasize\n";
34 print "# ----------------------------------------\n";
35
36 while (<>) {
37 if (/operand\s+([a-zA-Z_][a-zA-Z0-9_]*)\s+([\S]+)\s+\{/) {
38 printf ("%-20s\t$opcount\t$2\n", $1);
39 } else {
40 next;
41 }
42 $opcount++;
43 }