Package: ILexLocation

ILexLocation

Coverage

1: /*
2: * #%~
3: * The Overture Abstract Syntax Tree
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.ast.intf.lex;
23:
24: import java.io.File;
25:
26: import org.overture.ast.lex.LexLocation;
27: import org.overture.ast.node.ExternalNode;
28:
29: public interface ILexLocation extends ExternalNode
30: {
31:
32:         String toString();
33:
34:         String toShortString();
35:
36:         public LexLocation clone();
37:
38:         boolean within(ILexLocation span);
39:
40:         public void executable(boolean exe);
41:
42:         public void hit();
43:
44:         public boolean getExecutable();
45:
46:         public long getHits();
47:
48:         public void setHits(long hits);
49:
50:         /**
51:          * The filename of the token.
52:          *
53:          * @return
54:          */
55:         public File getFile();
56:
57:         /**
58:          * The module/class name of the token.
59:          *
60:          * @return
61:          */
62:         public String getModule();
63:
64:         /**
65:          * The line number of the start of the token.
66:          *
67:          * @return
68:          */
69:         public int getStartLine();
70:
71:         /**
72:          * The character position of the start of the token.
73:          *
74:          * @return
75:          */
76:         public int getStartPos();
77:
78:         /**
79:          * The last line of the token.
80:          *
81:          * @return
82:          */
83:         public int getEndLine();
84:
85:         /**
86:          * The character position of the end of the token.
87:          *
88:          * @return
89:          */
90:         public int getEndPos();
91:
92:         public int getStartOffset();
93:
94:         public int getEndOffset();
95:
96: }