<commit_before>parser grammar FlatJuniper_policy_options;

import FlatJuniper_common;

options {
   tokenVocab = FlatJuniperLexer;
}

base_community_regex
:
   ~( COLON | NEWLINE )+ COLON ~( COLON | NEWLINE )+
;

colort_apply_groups
:
   s_apply_groups
;

colort_color
:
   color = DEC
;

community_regex
:
   (
      base_community_regex PIPE
   )* base_community_regex
;

ct_members
:
   MEMBERS
   (
      extended_community
      | named_community
      // community_regex intentionally on bottom

      | community_regex
   )
;

fromt_area
:
   AREA area = IP_ADDRESS
;

fromt_as_path
:
   AS_PATH name = variable
;

fromt_color
:
   COLOR color = DEC
;

fromt_community
:
   COMMUNITY name = variable
;<commit_msg>juniper tentatively allow blank after from as-path<commit_after>parser grammar FlatJuniper_policy_options;

import FlatJuniper_common;

options {
   tokenVocab = FlatJuniperLexer;
}

base_community_regex
:
   ~( COLON | NEWLINE )+ COLON ~( COLON | NEWLINE )+
;

colort_apply_groups
:
   s_apply_groups
;

colort_color
:
   color = DEC
;

community_regex
:
   (
      base_community_regex PIPE
   )* base_community_regex
;

ct_members
:
   MEMBERS
   (
      extended_community
      | named_community
      // community_regex intentionally on bottom

      | community_regex
   )
;

fromt_area
:
   AREA area = IP_ADDRESS
;

fromt_as_path
:
   AS_PATH
   (
      name = variable
   )?
;

fromt_color
:
   COLOR color = DEC
;

fromt_community
:
   COMMUNITY name = variable
;
{'fraction_non_alphanumeric': 0.07095046854082998, 'fraction_numerical': 0.0, 'mean_word_length': 3.1527777777777777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '683132', 'n_tokens_mistral': 587, 'n_tokens_neox': 544, 'n_words': 102}