类 PythonTarget


  • public class PythonTarget
    extends Target
    • 构造器详细资料

      • PythonTarget

        public PythonTarget()
    • 方法详细资料

      • getTokenTypeAsTargetLabel

        public java.lang.String getTokenTypeAsTargetLabel​(CodeGenerator generator,
                                                          int ttype)
        Target must be able to override the labels used for token types
        覆盖:
        getTokenTypeAsTargetLabel 在类中 Target
      • getTargetCharLiteralFromANTLRCharLiteral

        public java.lang.String getTargetCharLiteralFromANTLRCharLiteral​(CodeGenerator generator,
                                                                         java.lang.String literal)
        从类复制的说明: 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.
        覆盖:
        getTargetCharLiteralFromANTLRCharLiteral 在类中 Target
      • postProcessAction

        public java.util.List<java.lang.Object> postProcessAction​(java.util.List<java.lang.Object> chunks,
                                                                  Token actionToken)
        从类复制的说明: Target
        Give target a chance to do some postprocessing on actions. Python for example will have to fix the indention.
        覆盖:
        postProcessAction 在类中 Target