Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 129 lines (122 sloc) 2.133 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 type token =
19 | Yield
20 | With
21 | While
22 | Void
23 | Var
24 | Typeof
25 | Try
26 | True
27 | TimesEqual
28 | Times
29 | Tilda
30 | Throw
31 | This
32 | Switch
33 | Super
34 | String of (string)
35 | Static
36 | Semic
37 | Rparen
38 | Return
39 | Regexp of (string * string)
40 | Rcurly
41 | Rbracket
42 | Question
43 | Public
44 | Protected
45 | Private
46 | PlusPlus
47 | PlusEqual
48 | Plus
49 | PercentEqual
50 | Percent
51 | Package
52 | Null
53 | New
54 | MinusMinus
55 | MinusEqual
56 | Minus
57 | LtLtEqual
58 | LtLt
59 | Lt
60 | Lparen
61 | Let
62 | Le
63 | Lcurly
64 | Lbracket
65 | LT
66 | Interface
67 | Integer of (string)
68 | Instanceof
69 | In
70 | Import
71 | Implements
72 | If
73 | Ident of (string)
74 | GtGtGtEqual
75 | GtGtGt
76 | GtGtEqual
77 | GtGt
78 | Gt
79 | Ge
80 | Function
81 | For
82 | Finally
83 | False
84 | Extends
85 | Export
86 | EqualEqualEqual
87 | EqualEqual
88 | Equal
89 | Enum
90 | Else
91 | EOF
92 | Dot
93 | Do
94 | DivEqual
95 | Div
96 | Delete
97 | Default
98 | Debugger
99 | Continue
100 | Const
101 | Comma
102 | Colon
103 | Class
104 | ChapeauEqual
105 | Chapeau
106 | Catch
107 | Case
108 | Break
109 | BarEqual
110 | BarBar
111 | Bar
112 | BangEqualEqual
113 | BangEqual
114 | Bang
115 | AmperEqual
116 | AmperAmper
117 | Amper
118
119 val init_lexer : unit -> unit
120 val lex : Lexing.lexbuf -> token
121 val stream : Lexing.lexbuf -> token Stream.t
122
123 (**
124 These high levels function automatically init the lexer
125 when called
126 *)
127 val stream_of_file : string -> token Stream.t * Lexing.lexbuf
128 val stream_of_string : string -> token Stream.t * Lexing.lexbuf
Something went wrong with that request. Please try again.