<commit_before>(* entry point *)
<S> = not

(* atoms *)
atom			= (letter|special) (letter|special|digit)*
<letter> 		= #'[A-Za-zÄÖÜäöüß]'
<special> 		= #'[\_\{\}\.\\]'			(* _ { } . \ *)
<digit> 		= #'[0-9]'
     
(* constants *)     
<constants> 	= true|false
true 			= <("True"|"T"|"1")>  
false 			= <("False"|"F"|"0")>

(* unary operators *)
not				= <("not"|"!")> atom<commit_msg>grammar extended<commit_after>(* entry point *)
<S> = expr

(* atoms *)
atom			= (letter|special) (letter|special|digit)*
<letter>		= #'[A-Za-zÄÖÜäöü]'
<special> 		= #'[\_\{\}\.\\]'	(* _ { } . \ *)
<digit> 		= #'[0-9]'
<exceptions>	= "xor"|"iff"|"nimpl"|"impl"|"nif"|"if"|
				  "nor"|"or"|"nand"|"and"|
				  "true"|"True"|
				  "false"|"False"

(* token *)
XOR 			= "xor"|"^"
EQUIV 			= "iff"|"<->"
NIMPL 			= "nimpl"
IMPL 			= "impl"|"->"
NIF 			= "nif"
IF  			= "if"|"<-"
NOR 			= "nor"|"!|"
OR	 			= "or"|"|"
NAND 			= "nand"|"!&"
AND 			= "and"|"&"
NOT				= "not"|"!"

(* constants *)     
<constant> 		= true|false
true 			= <("True"|"true"|"T"|"t"|"1")>  
false 			= <("False"|"false"|"F"|"f"|"0")>

(* unary operators *)
not				= <NOT> unexpr

(* binary operators *)
(* precedence, ascending order
		OP			ASSOC	
		equiv, xor	left
		impl, nimpl	right
		if, nif		right
		or, nor		left
		and, nand	left
*)

<expr>			= equiv_xor

<equiv_xor>		= xor | equiv | impl_nimpl
equiv			= equiv_xor <EQUIV> impl_nimpl 
xor 			= equiv_xor <XOR> impl_nimpl 

<impl_nimpl>	= nimpl | impl | if_nif
impl			= if_nif <IMPL> impl_nimpl
nimpl			= if_nif <NIMPL> impl_nimpl

<if_nif>		= if | nif | or_nor
if				= or_nor <IF> if_nif
nif				= or_nor <NIF> if_nif

<or_nor>		= or / nor / and_nand
or				= or_nor <OR> and_nand
nor				= or_nor <NOR> and_nand

<and_nand>		= and | nand | unexpr
and				= and_nand <AND> unexpr
nand			= and_nand <NAND> unexpr

<unexpr>		= not | subexpr

<subexpr>		= atom | constant |
				  <'('> expr <')'> |
				  <'['> expr <']'>
{'fraction_non_alphanumeric': 0.23898392949714878, 'fraction_numerical': 0.00414722654224987, 'mean_word_length': 2.9068825910931175, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 44, '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': '1740186', 'n_tokens_mistral': 1077, 'n_tokens_neox': 937, 'n_words': 172}