~ubuntu-branches/ubuntu/vivid/menhir/vivid

« back to all changes in this revision

Viewing changes to stretch.mli

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-07-11 12:26:18 UTC
  • Revision ID: james.westby@ubuntu.com-20060711122618-dea56bmjs3qlmsd8
Tags: upstream-20060615.dfsg
Import upstream version 20060615.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(**************************************************************************)
 
2
(*                                                                        *)
 
3
(*  Menhir                                                                *)
 
4
(*                                                                        *)
 
5
(*  Fran�ois Pottier and Yann R�gis-Gianas, INRIA Rocquencourt            *)
 
6
(*                                                                        *)
 
7
(*  Copyright 2005 Institut National de Recherche en Informatique et      *)
 
8
(*  en Automatique. All rights reserved. This file is distributed         *)
 
9
(*  under the terms of the Q Public License version 1.0, with the         *)
 
10
(*  change described in file LICENSE.                                     *)
 
11
(*                                                                        *)
 
12
(**************************************************************************)
 
13
 
 
14
(* $Id: stretch.mli,v 1.4 2005/12/01 16:20:07 regisgia Exp $ *)
 
15
 
 
16
(* A stretch is a fragment of a source file. It holds the file name,
 
17
   the line number, and the line count (that is, the length) of the
 
18
   fragment. These are used for generating #line directives when the
 
19
   fragment is copied to an output file. It also holds the textual
 
20
   content of the fragment, as a string. The [raw_content] field holds
 
21
   the text that was found in the source file, while the [content]
 
22
   field holds the same text after transformation by the lexer (which
 
23
   substitutes keywords, inserts padding, etc.). *)
 
24
 
 
25
type t = {
 
26
    stretch_filename    : string;
 
27
    stretch_linenum     : int;
 
28
    stretch_linecount   : int;
 
29
    stretch_raw_content : string;
 
30
    stretch_content     : string;
 
31
    stretch_keywords    : Keyword.keyword Positions.located list
 
32
  } 
 
33
 
 
34
(* An Objective Caml type is either a stretch (if it was found in some
 
35
   source file) or a string (if it was inferred via [Infer]). *)
 
36
 
 
37
type ocamltype =
 
38
  | Declared of t
 
39
  | Inferred of string
 
40