diff options
author | unknown <arjen@co3064164-a.bitbike.com> | 2001-11-20 13:29:02 +1000 |
---|---|---|
committer | unknown <arjen@co3064164-a.bitbike.com> | 2001-11-20 13:29:02 +1000 |
commit | 49ddcb92d2a1a595803d2588728017680d4d7c2c (patch) | |
tree | 6b49c01694ef23edb5fba3bfe27f90946d978e27 /Docs/Support | |
parent | 079f110a4a80bb23b990c14995ad3b0f25fce2fa (diff) | |
download | mariadb-git-49ddcb92d2a1a595803d2588728017680d4d7c2c.tar.gz |
Fix to reserved words script.
Updated reserved words list in manual.
Docs/Support/update-reserved-words.pl:
Fix to reserved words script, 2 keywords and 15 synonyms were missing.
Docs/manual.texi:
Updated reserved word list.
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; |