blob: 263e7ba944e1b34753badc82d551b9c21aee0c17 (
plain) (
blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/**
* Copyright (c) 2004, 2008 INRIA.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* INRIA - initial API and implementation
*
* $Id: ParserWrapper.java,v 1.6 2008/06/28 17:12:25 fjouault Exp $
*/
package org.eclipse.gmt.tcs.injector.wrappers;
import java.io.InputStream;
import java.util.Map;
import org.eclipse.gmt.tcs.injector.TCSRuntime;
/**
* @author Frédéric Jouault
* @author Mikaël Barbero
*/
public abstract class ParserWrapper {
// Token Types
protected int TT_NL = -1;
protected int TT_WS = -1;
protected int TT_COMMENT = -1;
protected final String pack = "org.eclipse.gmt.tcs.injector.";
protected TCSRuntime runtime;
public abstract Object parse(int tabSize, String name, String productionRule, InputStream in, Map params) throws Exception;
public abstract void reportError(Exception re);
public abstract void setCommentsBefore(Object ame, Object token);
public abstract void setCommentsAfter(Object ame_, Object token_);
public abstract Object getLastToken();
public abstract String getLocation(Object token);
public abstract int getStartOffset(Object token);
public abstract int getEndOffset(Object token);
public void setRuntime(TCSRuntime runtime) {
this.runtime = runtime;
}
}
|