<commit_before>/*
 * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
 * Use of this file is governed by the BSD 3-clause license that
 * can be found in the LICENSE.txt file in the project root.
 */

package org.antlr.v4.test.runtime.descriptors;

import org.antlr.v4.test.runtime.BaseParserTestDescriptor;
import org.antlr.v4.test.runtime.CommentHasStringValue;

public class ParseTreesDescriptors {
	public static class AltNum extends BaseParserTestDescriptor {
		public String input = "xyz";
		public String output = "(a:3 x (b:2 y) z)\n";
		public String errors = null;
		public String startRule = "s";
		public String grammarName = "T";

		/**
		 grammar T;

		 options { contextSuperClass=MyRuleNode; }

		 <TreeNodeWithAltNumField(X="T")>


		 s
		 @init {
		 <BuildParseTrees()>
		 }
		 @after {
		 <ToStringTree("$r.ctx"):writeln()>
		 }
		   : r=a ;

		 a : 'f'
		   | 'g'
		   | 'x' b 'z'
		   ;
		 b : 'e' {} | 'y'
		   ;
		 */
		@CommentHasStringValue
		public String grammar;

	}

	public static class ExtraToken extends BaseParserTestDescriptor {
		public String input = "xzy";
		public String output = "(a x z y)\n";
		public String errors = "line 1:1 extraneous input 'z' expecting 'y'\n";
		public String startRule = "s";
		public String grammarName = "T";

		/**
		 grammar T;
		 s
		 @init {
		 <BuildParseTrees()>
		 }
		 @after {
		 <ToStringTree("$r.ctx"):writeln()>
		 }
		   : r=a ;
		 a : 'x' 'y'
		   ;
		 Z : 'z'
		   ;

		 */
		@CommentHasStringValue
		public String grammar;

	}

	public static class ExtraTokensAndAltLabels extends BaseParserTestDescriptor {
		public String input = "${ ? a ?}";
		public String output = "(s ${ (v ? a) ? })\n";
		public String errors =
			"line 1:3 extraneous input '?' expecting {'a', 'b'}\n"+
			"line 1:7 extraneous input '?' expecting '}'\n";
		public String startRule = "s";
		public String grammarName = "T";

		/**
		 grammar T;

		 s
		 @init {
		 <BuildParseTrees()>
		 }
		 @after {
		 <ToStringTree("$ctx"):writeln()>
		 }
   		   : '${' v '}'
		   ;

		 v : A #altA
		   | B #altB
		   ;

		 A : 'a' ;
		 B : 'b' ;

		 WHITESPACE : [ \n\t\r]+ -> channel(HIDDEN) ;

		 ERROR : . ;
		 */
		@CommentHasStringValue
		public String grammar;

		@Override
		public boolean ignore(String targetName) {
			return !targetName.matches("Java|Python2|Python3|Node|Swift|CSharp|Dart");
		}
	}<commit_msg>Disable Node tests in AppVeyor for now<commit_after>/*
 * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
 * Use of this file is governed by the BSD 3-clause license that
 * can be found in the LICENSE.txt file in the project root.
 */

package org.antlr.v4.test.runtime.descriptors;

import org.antlr.v4.test.runtime.BaseParserTestDescriptor;
import org.antlr.v4.test.runtime.CommentHasStringValue;

public class ParseTreesDescriptors {
	public static class AltNum extends BaseParserTestDescriptor {
		public String input = "xyz";
		public String output = "(a:3 x (b:2 y) z)\n";
		public String errors = null;
		public String startRule = "s";
		public String grammarName = "T";

		/**
		 grammar T;

		 options { contextSuperClass=MyRuleNode; }

		 <TreeNodeWithAltNumField(X="T")>


		 s
		 @init {
		 <BuildParseTrees()>
		 }
		 @after {
		 <ToStringTree("$r.ctx"):writeln()>
		 }
		   : r=a ;

		 a : 'f'
		   | 'g'
		   | 'x' b 'z'
		   ;
		 b : 'e' {} | 'y'
		   ;
		 */
		@CommentHasStringValue
		public String grammar;

	}

	public static class ExtraToken extends BaseParserTestDescriptor {
		public String input = "xzy";
		public String output = "(a x z y)\n";
		public String errors = "line 1:1 extraneous input 'z' expecting 'y'\n";
		public String startRule = "s";
		public String grammarName = "T";

		/**
		 grammar T;
		 s
		 @init {
		 <BuildParseTrees()>
		 }
		 @after {
		 <ToStringTree("$r.ctx"):writeln()>
		 }
		   : r=a ;
		 a : 'x' 'y'
		   ;
		 Z : 'z'
		   ;

		 */
		@CommentHasStringValue
		public String grammar;

	}

	public static class ExtraTokensAndAltLabels extends BaseParserTestDescriptor {
		public String input = "${ ? a ?}";
		public String output = "(s ${ (v ? a) ? })\n";
		public String errors =
			"line 1:3 extraneous input '?' expecting {'a', 'b'}\n"+
			"line 1:7 extraneous input '?' expecting '}'\n";
		public String startRule = "s";
		public String grammarName = "T";

		/**
		 grammar T;

		 s
		 @init {
		 <BuildParseTrees()>
		 }
		 @after {
		 <ToStringTree("$ctx"):writeln()>
		 }
   		   : '${' v '}'
		   ;

		 v : A #altA
		   | B #altB
		   ;

		 A : 'a' ;
		 B : 'b' ;

		 WHITESPACE : [ \n\t\r]+ -> channel(HIDDEN) ;

		 ERROR : . ;
		 */
		@CommentHasStringValue
		public String grammar;

		@Override
		public boolean ignore(String targetName) {
			if(isAppVeyorCI())
				return "Node".equals(targetName) || "Swift".equals(targetName);
			else
				return !targetName.matches("Java|Python2|Python3|Node|Swift|CSharp|Dart");
		}
	}
{'fraction_non_alphanumeric': 0.1441717791411043, 'fraction_numerical': 0.00899795501022495, 'mean_word_length': 2.83307210031348, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2409297', 'n_tokens_mistral': 1993, 'n_tokens_neox': 1638, 'n_words': 453}