Package org.antlr.codegen
Class Perl5Target
- java.lang.Object
-
- org.antlr.codegen.Target
-
- org.antlr.codegen.Perl5Target
-
public class Perl5Target extends Target
-
-
Field Summary
-
Fields inherited from class org.antlr.codegen.Target
targetCharValueEscape
-
-
Constructor Summary
Constructors Constructor Description Perl5Target()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
encodeIntAsCharEscape(int v)
java.lang.String
getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator, java.lang.String literal)
Convert from an ANTLR char literal found in a grammar file to an equivalent char literal in the target language.-
Methods inherited from class org.antlr.codegen.Target
genRecognizerFile, genRecognizerHeaderFile, getMaxCharValue, getTarget64BitStringFromValue, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromString, getTargetStringLiteralFromString, getTokenTypeAsTargetLabel, isValidActionScope, performGrammarAnalysis, postProcessAction, useBaseTemplatesForSynPredFragments
-
-
-
-
Method Detail
-
getTargetCharLiteralFromANTLRCharLiteral
public java.lang.String getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator, java.lang.String literal)
Description copied from class:Target
Convert from an ANTLR char literal found in a grammar file to an equivalent char literal in the target language. For most languages, this means leaving 'x' as 'x'. Actually, we need to escape ' ' so that it doesn't get converted to \n by the compiler. Convert the literal to the char value and then to an appropriate target char literal. Expect single quotes around the incoming literal.- Overrides:
getTargetCharLiteralFromANTLRCharLiteral
in classTarget
-
encodeIntAsCharEscape
public java.lang.String encodeIntAsCharEscape(int v)
- Overrides:
encodeIntAsCharEscape
in classTarget
-
-