File: lex_syntax.mli

package info (click to toggle)
ocamlweb 1.37-13
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 712 kB
  • ctags: 820
  • sloc: ml: 5,758; sh: 1,749; makefile: 253
file content (35 lines) | stat: -rw-r--r-- 1,523 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(***********************************************************************)
(*                                                                     *)
(*                           Objective Caml                            *)
(*                                                                     *)
(*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
(*                                                                     *)
(*  Copyright 1996 Institut National de Recherche en Informatique et   *)
(*  en Automatique.  All rights reserved.  This file is distributed    *)
(*  under the terms of the Q Public License version 1.0.               *)
(*                                                                     *)
(***********************************************************************)

(* $Id: lex_syntax.mli,v 1.3 2004/10/12 12:29:19 filliatr Exp $ *)

(* The shallow abstract syntax *)

type location =
    { start_pos: Lexing.position;
      end_pos: Lexing.position;
      start_line: int;
      start_col: int }

type regular_expression =
    Epsilon
  | Characters of int list
  | Sequence of regular_expression * regular_expression
  | Alternative of regular_expression * regular_expression
  | Repetition of regular_expression
  | Ident of string * location

type lexer_definition =
    { header: location;
      named_regexps : (string * location * regular_expression) list;
      entrypoints: (string * location * (regular_expression * location) list) list;
      trailer: location }