Package org.eclipse.cdt.core.dom.parser
Class AbstractScannerExtensionConfiguration
java.lang.Object
org.eclipse.cdt.core.dom.parser.AbstractScannerExtensionConfiguration
- All Implemented Interfaces:
IScannerExtensionConfiguration
- Direct Known Subclasses:
GNUScannerExtensionConfiguration
public abstract class AbstractScannerExtensionConfiguration
extends Object
implements IScannerExtensionConfiguration
Abstract scanner extension configuration to help model C/C++ dialects.
- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addKeyword
(char[] name, int tokenKind) Adds a keyword to the map of additional keywords.protected void
Adds a macro to the list of additional macros.protected void
addPreprocessorKeyword
(char[] name, int tokenKind) Adds a preprocessor keyword to the map of additional preprocessor keywords.protected static IMacro
createFunctionStyleMacro
(String name, String value, String[] arguments) Deprecated.protected static IMacro
createMacro
(String signature, String value) Deprecated.Support for additional keywords.IMacro[]
Support for additional macros.Support for additional preprocessor directives.boolean
Deprecated.boolean
Support for GNU extension "Dollar Signs in Identifier Names".char[]
Support for additional numeric literal suffix characters, like e.g.boolean
Support for extension "At Signs in Identifier Names".boolean
Support for C++14 digit separators in integer literalsboolean
Support for (deprecated) GNU minimum and maximum operators (<?
and>?
).boolean
Support for C++ raw string literals.boolean
Support for block-comments comments using /% %/.boolean
Support for User Defined Literals such as 123_suffixboolean
Support for UTF string literals.
-
Constructor Details
-
AbstractScannerExtensionConfiguration
public AbstractScannerExtensionConfiguration()
-
-
Method Details
-
support$InIdentifiers
public boolean support$InIdentifiers()Description copied from interface:IScannerExtensionConfiguration
Support for GNU extension "Dollar Signs in Identifier Names".- Specified by:
support$InIdentifiers
in interfaceIScannerExtensionConfiguration
- Returns:
true
, if $ should be supported in identifiers- See Also:
-
- "http://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html"
-
supportAtSignInIdentifiers
public boolean supportAtSignInIdentifiers()Support for extension "At Signs in Identifier Names". If enabled, the '@' sign is treated as part of identifiers.- Specified by:
supportAtSignInIdentifiers
in interfaceIScannerExtensionConfiguration
- Returns:
true
, if @ should be supported in identifiers- Since:
- 5.1
-
supportUTFLiterals
public boolean supportUTFLiterals()Support for UTF string literals.- Specified by:
supportUTFLiterals
in interfaceIScannerExtensionConfiguration
- Since:
- 5.1
- See Also:
-
- "http://publib.boulder.ibm.com/infocenter/comphelp/v101v121/index.jsp?topic=/com.ibm.xlcpp101.aix.doc/language_ref/unicode_standard.html"
-
supportSlashPercentComments
public boolean supportSlashPercentComments()Support for block-comments comments using /% %/.- Specified by:
supportSlashPercentComments
in interfaceIScannerExtensionConfiguration
- Returns:
true
, if /% should be interpreted as the start of a block-comment which is ended by %/- Since:
- 5.1
-
supportAdditionalNumericLiteralSuffixes
public char[] supportAdditionalNumericLiteralSuffixes()Description copied from interface:IScannerExtensionConfiguration
Support for additional numeric literal suffix characters, like e.g. 'i' and 'j' for GNU Complex number literals.- Specified by:
supportAdditionalNumericLiteralSuffixes
in interfaceIScannerExtensionConfiguration
- Returns:
- an array of chars or
null
, if no additional suffixes should be allowed - See Also:
-
- "http://gcc.gnu.org/onlinedocs/gcc/Complex.html"
-
supportMinAndMaxOperators
public boolean supportMinAndMaxOperators()Description copied from interface:IScannerExtensionConfiguration
Support for (deprecated) GNU minimum and maximum operators (<?
and>?
).- Specified by:
supportMinAndMaxOperators
in interfaceIScannerExtensionConfiguration
- Returns:
true
if support for the extension should be enabled- See Also:
-
- "http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html"
-
supportRawStringLiterals
public boolean supportRawStringLiterals()Description copied from interface:IScannerExtensionConfiguration
Support for C++ raw string literals.- Specified by:
supportRawStringLiterals
in interfaceIScannerExtensionConfiguration
- Since:
- 5.5
-
supportUserDefinedLiterals
public boolean supportUserDefinedLiterals()Support for User Defined Literals such as 123_suffix- Specified by:
supportUserDefinedLiterals
in interfaceIScannerExtensionConfiguration
- Since:
- 5.11
-
supportDigitSeparators
public boolean supportDigitSeparators()Description copied from interface:IScannerExtensionConfiguration
Support for C++14 digit separators in integer literals- Specified by:
supportDigitSeparators
in interfaceIScannerExtensionConfiguration
-
getAdditionalPreprocessorKeywords
Description copied from interface:IScannerExtensionConfiguration
Support for additional preprocessor directives.- Specified by:
getAdditionalPreprocessorKeywords
in interfaceIScannerExtensionConfiguration
- Returns:
- a mapping of preprocessor directive keyword to one of the
constants defined in
IPreprocessorDirective
ornull
for no additional keywords.
-
getAdditionalKeywords
Description copied from interface:IScannerExtensionConfiguration
Support for additional keywords.- Specified by:
getAdditionalKeywords
in interfaceIScannerExtensionConfiguration
- Returns:
- a mapping of keyword name to one of the constants defined in
IToken
ornull
for no additional keywords.
-
getAdditionalMacros
Description copied from interface:IScannerExtensionConfiguration
Support for additional macros.- Specified by:
getAdditionalMacros
in interfaceIScannerExtensionConfiguration
- Returns:
- an array of macros or
null
for no additional macros.
-
addMacro
Adds a macro to the list of additional macros. The macro can either be of object- or of function-style.Example: addMacro("max(a,b)", "(((a)>(b) ? (a) : (b))");
- Parameters:
signature
- the signature of the macro, seeIMacro.getSignature()
.value
- the macro value- Since:
- 5.1
-
addPreprocessorKeyword
protected void addPreprocessorKeyword(char[] name, int tokenKind) Adds a preprocessor keyword to the map of additional preprocessor keywords.- Parameters:
name
- the name of the keywordtokenKind
- the kind of token the keyword is mapped to. SeeIToken
.- Since:
- 5.1
-
addKeyword
protected void addKeyword(char[] name, int tokenKind) Adds a keyword to the map of additional keywords.- Parameters:
name
- the name of the keywordtokenKind
- the kind of token the keyword is mapped to. SeeIToken
.- Since:
- 5.1
-
createMacro
Deprecated. -
createFunctionStyleMacro
@Deprecated protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments) Deprecated. -
initializeMacroValuesTo1
Deprecated.- Specified by:
initializeMacroValuesTo1
in interfaceIScannerExtensionConfiguration
-
addMacro(String, String)