public class RubyTarget extends Target
| Modifier and Type | Class and Description |
|---|---|
class |
RubyTarget.RubyRenderer |
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
rubyKeywords
A set of ruby keywords which are used to escape labels and method names
which will cause parse errors in the ruby source
|
static Map<String,Map<String,Object>> |
sharedActionBlocks |
targetCharValueEscape| Constructor and Description |
|---|
RubyTarget() |
| Modifier and Type | Method and Description |
|---|---|
String |
encodeIntAsCharEscape(int v) |
protected void |
genRecognizerFile(Tool tool,
CodeGenerator generator,
Grammar grammar,
org.stringtemplate.v4.ST outputFileST) |
int |
getMaxCharValue(CodeGenerator generator)
Some targets only support ASCII or 8-bit chars/strings.
|
String |
getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator,
String literal)
Convert from an ANTLR char literal found in a grammar file to
an equivalent char literal in the target language.
|
String |
getTokenTypeAsTargetLabel(CodeGenerator generator,
int ttype)
Target must be able to override the labels used for token types
|
boolean |
isValidActionScope(int grammarType,
String scope)
Is scope in @scope::name {action} valid for this kind of grammar?
Targets like C++ may want to allow new scopes like headerfile or
some such.
|
genRecognizerHeaderFile, getTarget64BitStringFromValue, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromString, getTargetStringLiteralFromString, performGrammarAnalysis, postProcessAction, useBaseTemplatesForSynPredFragmentspublic static final Set<String> rubyKeywords
protected void genRecognizerFile(Tool tool, CodeGenerator generator, Grammar grammar, org.stringtemplate.v4.ST outputFileST) throws IOException
genRecognizerFile in class TargetIOExceptionpublic String getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator, String literal)
TargetgetTargetCharLiteralFromANTLRCharLiteral in class Targetpublic int getMaxCharValue(CodeGenerator generator)
TargetgetMaxCharValue in class Targetpublic String getTokenTypeAsTargetLabel(CodeGenerator generator, int ttype)
TargetgetTokenTypeAsTargetLabel in class Targetpublic boolean isValidActionScope(int grammarType,
String scope)
TargetisValidActionScope in class Targetpublic String encodeIntAsCharEscape(int v)
encodeIntAsCharEscape in class TargetCopyright © 1992–2014 ANTLR. All rights reserved.