~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to tools/lexer301.mll

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
(*                                                                     *)
11
11
(***********************************************************************)
12
12
 
13
 
(* $Id: lexer301.mll 6720 2004-11-30 18:57:04Z doligez $ *)
 
13
(* $Id: lexer301.mll 9547 2010-01-22 12:48:24Z doligez $ *)
14
14
 
15
15
(* The lexer definition *)
16
16
 
233
233
let char_for_decimal_code lexbuf i =
234
234
  let c = 100 * (Char.code(Lexing.lexeme_char lexbuf i) - 48) +
235
235
           10 * (Char.code(Lexing.lexeme_char lexbuf (i+1)) - 48) +
236
 
                (Char.code(Lexing.lexeme_char lexbuf (i+2)) - 48) in  
 
236
                (Char.code(Lexing.lexeme_char lexbuf (i+2)) - 48) in
237
237
  Char.chr(c land 0xFF)
238
238
 
239
239
(* To store the position of the beginning of a string and comment *)
263
263
let blank = [' ' '\010' '\013' '\009' '\012']
264
264
let lowercase = ['a'-'z' '\223'-'\246' '\248'-'\255' '_']
265
265
let uppercase = ['A'-'Z' '\192'-'\214' '\216'-'\222']
266
 
let identchar = 
 
266
let identchar =
267
267
  ['A'-'Z' 'a'-'z' '_' '\192'-'\214' '\216'-'\246' '\248'-'\255' '\'' '0'-'9']
268
268
let symbolchar =
269
269
  ['!' '$' '%' '&' '*' '+' '-' '.' '/' ':' '<' '=' '>' '?' '@' '^' '|' '~']