blob: 911de12803b2b1f1d553eda8ac570ebcf46cc99c (
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
|
/*******************************************************************************
* Copyright (c) 2006, 2008 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.lrparser;
import org.eclipse.cdt.core.parser.IToken;
/**
* Maps tokens returned by CPreprocessor to the corresponding
* token kind used by an LPG based parser.
*
* @author Mike Kucera
*/
public interface IDOMTokenMap {
/**
* Returns the LPG token kind for the given DOM token.
* @throws NullPointerException if token is null
*/
int mapKind(IToken token);
/**
* Returns the LPG token type for End Of File (TK_EOF_TOKEN) token.
*/
int getEOFTokenKind();
/**
* Returns the LPG token type for End Of Completion (TK_EndOfCompletion) token.
*/
int getEOCTokenKind();
}
|