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
Nested Classes Modifier and Type Class Description protected static classAbstractScannerExtensionConfiguration.MacroDefinition
-
Constructor Summary
Constructors Constructor Description AbstractScannerExtensionConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddKeyword(char[] name, int tokenKind)Adds a keyword to the map of additional keywords.protected voidaddMacro(String signature, String value)Adds a macro to the list of additional macros.protected voidaddPreprocessorKeyword(char[] name, int tokenKind)Adds a preprocessor keyword to the map of additional preprocessor keywords.protected static IMacrocreateFunctionStyleMacro(String name, String value, String[] arguments)Deprecated.protected static IMacrocreateMacro(String signature, String value)Deprecated.CharArrayIntMapgetAdditionalKeywords()Support for additional keywords.IMacro[]getAdditionalMacros()Support for additional macros.CharArrayIntMapgetAdditionalPreprocessorKeywords()Support for additional preprocessor directives.booleaninitializeMacroValuesTo1()Deprecated.booleansupport$InIdentifiers()Support for GNU extension "Dollar Signs in Identifier Names".char[]supportAdditionalNumericLiteralSuffixes()Support for additional numeric literal suffix characters, like e.g.booleansupportAtSignInIdentifiers()Support for extension "At Signs in Identifier Names".booleansupportDigitSeparators()Support for C++14 digit separators in integer literalsbooleansupportMinAndMaxOperators()Support for (deprecated) GNU minimum and maximum operators (<?and>?).booleansupportRawStringLiterals()Support for C++ raw string literals.booleansupportSlashPercentComments()Support for block-comments comments using /% %/.booleansupportUserDefinedLiterals()Support for User Defined Literals such as 123_suffixbooleansupportUTFLiterals()Support for UTF string literals.
-
-
-
Method Detail
-
support$InIdentifiers
public boolean support$InIdentifiers()
Description copied from interface:IScannerExtensionConfigurationSupport for GNU extension "Dollar Signs in Identifier Names".- Specified by:
support$InIdentifiersin 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:
supportAtSignInIdentifiersin interfaceIScannerExtensionConfiguration- Returns:
true, if @ should be supported in identifiers- Since:
- 5.1
-
supportUTFLiterals
public boolean supportUTFLiterals()
Support for UTF string literals.- Specified by:
supportUTFLiteralsin 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:
supportSlashPercentCommentsin 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:IScannerExtensionConfigurationSupport for additional numeric literal suffix characters, like e.g. 'i' and 'j' for GNU Complex number literals.- Specified by:
supportAdditionalNumericLiteralSuffixesin 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:IScannerExtensionConfigurationSupport for (deprecated) GNU minimum and maximum operators (<?and>?).- Specified by:
supportMinAndMaxOperatorsin interfaceIScannerExtensionConfiguration- Returns:
trueif 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:IScannerExtensionConfigurationSupport for C++ raw string literals.- Specified by:
supportRawStringLiteralsin interfaceIScannerExtensionConfiguration- Since:
- 5.5
-
supportUserDefinedLiterals
public boolean supportUserDefinedLiterals()
Support for User Defined Literals such as 123_suffix- Specified by:
supportUserDefinedLiteralsin interfaceIScannerExtensionConfiguration- Since:
- 5.11
-
supportDigitSeparators
public boolean supportDigitSeparators()
Description copied from interface:IScannerExtensionConfigurationSupport for C++14 digit separators in integer literals- Specified by:
supportDigitSeparatorsin interfaceIScannerExtensionConfiguration
-
getAdditionalPreprocessorKeywords
public CharArrayIntMap getAdditionalPreprocessorKeywords()
Description copied from interface:IScannerExtensionConfigurationSupport for additional preprocessor directives.- Specified by:
getAdditionalPreprocessorKeywordsin interfaceIScannerExtensionConfiguration- Returns:
- a mapping of preprocessor directive keyword to one of the
constants defined in
IPreprocessorDirectiveornullfor no additional keywords.
-
getAdditionalKeywords
public CharArrayIntMap getAdditionalKeywords()
Description copied from interface:IScannerExtensionConfigurationSupport for additional keywords.- Specified by:
getAdditionalKeywordsin interfaceIScannerExtensionConfiguration- Returns:
- a mapping of keyword name to one of the constants defined in
ITokenornullfor no additional keywords.
-
getAdditionalMacros
public IMacro[] getAdditionalMacros()
Description copied from interface:IScannerExtensionConfigurationSupport for additional macros.- Specified by:
getAdditionalMacrosin interfaceIScannerExtensionConfiguration- Returns:
- an array of macros or
nullfor no additional macros.
-
addMacro
protected void addMacro(String signature, String value)
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 protected static IMacro createMacro(String signature, String value)
Deprecated.
-
createFunctionStyleMacro
@Deprecated protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments)
Deprecated.
-
initializeMacroValuesTo1
@Deprecated public boolean initializeMacroValuesTo1()
Deprecated.- Specified by:
initializeMacroValuesTo1in interfaceIScannerExtensionConfiguration
-
-