anchor.diff:  // parser. This means that the parser to deal with the gramamr file anyway
   // but we will not try to analyse or code generate from a file with lexical
   // errors.
  -//
  +
   // Comment this rule out to allow the error to be propagated to the parser
  -
   ERRCHAR
  -	:	.	-> channel(HIDDEN)
  -	;
  -
  +   : . -> channel (HIDDEN)
  +   ;
   
   // ======================================================
   // Lexer modes
  -
   // -------------------------
   // Arguments
  -
  -mode Argument;			// E.g., [int x, List<String> a[]]
  -
  -	NESTED_ARGUMENT			: LBrack			-> type(ARGUMENT_CONTENT), pushMode(Argument)	;
  -
  -	ARGUMENT_ESCAPE			: EscAny			-> type(ARGUMENT_CONTENT)		;
  -
  -	ARGUMENT_STRING_LITERAL	: DQuoteLiteral	-> type(ARGUMENT_CONTENT)		;
  -	ARGUMENT_CHAR_LITERAL	: SQuoteLiteral	-> type(ARGUMENT_CONTENT)		;
  -
  -	END_ARGUMENT			: RBrack	{ self.handleEndArgument() }	;
  -
  -	// added this to return non-EOF token type here. EOF does something weird
  -	UNTERMINATED_ARGUMENT 	: EOF		-> popMode		;
  -
  -	ARGUMENT_CONTENT		: .							;
  -
  -
  -// -------------------------
  -// Actions
  +mode Argument;
  +// E.g., [int x, List<String> a[]]
  +NESTED_ARGUMENT
  +   : LBrack -> type (ARGUMENT_CONTENT) , pushMode (Argument)
  +   ;
  +
  +ARGUMENT_ESCAPE
  +   : EscAny -> type (ARGUMENT_CONTENT)
  +   ;
  +
  +ARGUMENT_STRING_LITERAL
  +   : DQuoteLiteral -> type (ARGUMENT_CONTENT)
  +   ;
  +
  +ARGUMENT_CHAR_LITERAL
  +   : SQuoteLiteral -> type (ARGUMENT_CONTENT)
  +   ;
  +
  +END_ARGUMENT
  +   : RBrack
  +   { self.handleEndArgument() }
  +   ;
  +
  +// added this to return non-EOF token type here. EOF does something weird
  +UNTERMINATED_ARGUMENT
  +   : EOF -> popMode
  +   ;
  +
  +ARGUMENT_CONTENT
  +   : .
  +   ;
  +
  +// -------------------------
  +// Target Language Actions
   //
   // Many language targets use {} as block delimiters and so we
   // must recursively match {} delimited blocks to balance the
  
positive.code:  *	-- update for compatibility with Antlr v4.5
   */
  
  lexer grammar ANTLRv4LexerPythonTarget;
  
  options {
  	superClass = LexerAdaptor ;
  }
  
  import LexBasic;	// Standard set of fragments
  
  @header {
  //from LexerAdaptor import LexerAdaptor
  }
  
  tokens {
  	TOKEN_REF,
  	RULE_REF,
  	LEXER_CHAR_SET
  }
  
  channels {
  	OFF_CHANNEL		// non-default channel for whitespace and comments
  }
  
  
  // ======================================================
  // Lexer specification
  //
  
  // -------------------------
  // Comments
  
  DOC_COMMENT
  	:	DocComment
  	;
  
  BLOCK_COMMENT
  	:	BlockComment	-> channel(OFF_CHANNEL)
  	;
  
  LINE_COMMENT
  	:	LineComment		-> channel(OFF_CHANNEL)
  	;
  
  
  // -------------------------
  // Integer
  //
  
  INT	: DecimalNumeral
  	;
  
  
  // -------------------------
  // Literal string
  
negative.code: // multi-character string. All literals are single quote delimited and
  // may contain unicode escape sequences of the form \uxxxx, where x
  // is a valid hexadecimal number (per Unicode standard).
  STRING_LITERAL
     : SQuoteLiteral
     ;
  
  UNTERMINATED_STRING_LITERAL
     : USQuoteLiteral
     ;
  
  // -------------------------
  // Arguments
  