diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 1999-12-07 15:01:12 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 1999-12-07 15:01:12 +0000 |
commit | aa78984afcb46226cbc35922af41ff79278a237a (patch) | |
tree | ea46e4d7c75c737e75d06b7e19824696bfb15b6f /otherlibs/labltk/compiler/parser.mly | |
parent | bacf15f6140b9f78230fcd06058e2934cfdea067 (diff) |
changed syntax for default values and some labels
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2674 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/compiler/parser.mly')
-rw-r--r-- | otherlibs/labltk/compiler/parser.mly | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/otherlibs/labltk/compiler/parser.mly b/otherlibs/labltk/compiler/parser.mly index ce7895232..336c4d47a 100644 --- a/otherlibs/labltk/compiler/parser.mly +++ b/otherlibs/labltk/compiler/parser.mly @@ -4,13 +4,6 @@ open Tables -let lowercase s = - let r = String.create len:(String.length s) in - String.blit s pos:0 to:r to_pos:0 len:(String.length s); - let c = s.[0] in - if c >= 'A' & c <= 'Z' then r.[0] <- Char.chr(Char.code c + 32); - r - %} /* Tokens */ @@ -53,7 +46,7 @@ let lowercase s = %% TypeName: - IDENT { lowercase $1 } + IDENT { String.uncapitalize $1 } | WIDGET { "widget" } ; @@ -306,7 +299,7 @@ entry : | WIDGET IDENT LBRACE WidgetComponents RBRACE { enter_widget $2 $4 } | MODULE IDENT LBRACE ModuleComponents RBRACE - { enter_module (lowercase $2) $4 } + { enter_module (String.uncapitalize $2) $4 } | EOF { raise End_of_file } ; |