diff options
author | arjen@co3064164-a.bitbike.com <> | 2001-11-20 13:29:02 +1000 |
---|---|---|
committer | arjen@co3064164-a.bitbike.com <> | 2001-11-20 13:29:02 +1000 |
commit | a0878d336b55a3975d94aeec4691373c07c6e8d0 (patch) | |
tree | 6b49c01694ef23edb5fba3bfe27f90946d978e27 /Docs/Support | |
parent | 2b17a22a6b68c2fefbd268a3add7914d1c3dac37 (diff) | |
download | mariadb-git-a0878d336b55a3975d94aeec4691373c07c6e8d0.tar.gz |
Fix to reserved words script.
Updated reserved words list in manual.
Diffstat (limited to 'Docs/Support')
-rwxr-xr-x | Docs/Support/update-reserved-words.pl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Docs/Support/update-reserved-words.pl b/Docs/Support/update-reserved-words.pl index a93d63f678f..aeaa7471751 100755 --- a/Docs/Support/update-reserved-words.pl +++ b/Docs/Support/update-reserved-words.pl @@ -1,10 +1,14 @@ #!/usr/bin/perl +# Based on a Emacs macro by david@mysql.com +# Implemented in Perl by jeremy@mysql.com +# 2001-11-20 Fixups by arjen@mysql.com, 2 keywords and 15 synonyms were missing + print STDERR "Scanning lex.h for symbols..\n"; open LEX, "<../sql/lex.h"; while($line = <LEX>) { - if($line =~ /\{\s+\"([A-Z_]+)\",\s+SYM\(([A-Z_]+)\)/) { - $words{$2} = $1; + if($line =~ /\{\s*\"([A-Z_]+)\"/) { + $words{$1} = $1; } elsif($line =~ /sql_functions/) { last; }; @@ -15,7 +19,9 @@ print STDERR "Scanning sql_yacc.yy for non-reserved words...\n"; open YACC, "<../sql/sql_yacc.yy"; while(<YACC> !~ /^keyword:/) {}; while(($line = <YACC>) =~ /[\s|]+([A-Z_]+)/) { - delete $words{$1}; + $keyword = $1; + $keyword =~ s/_SYM//; + delete $words{$keyword}; }; close YACC; |