mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Extended Backus–Naur form ([EBNF][]) is a metalanguage used to specify language grammars. [EBNF]: https://en.wikipedia.org/wiki/Extended_Backus–Naur_form
		
			
				
	
	
		
			21 lines
		
	
	
		
			306 B
		
	
	
	
		
			EBNF
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			306 B
		
	
	
	
		
			EBNF
		
	
	
	
	
	
(*
 | 
						|
  Source:  https://github.com/io7m/jsom0
 | 
						|
  License: ISC
 | 
						|
*)
 | 
						|
 | 
						|
digit_without_zero =
 | 
						|
  "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
 | 
						|
 | 
						|
digit =
 | 
						|
  "0" | digit_without_zero ;
 | 
						|
 | 
						|
positive =
 | 
						|
  digit_without_zero , { digit } ;
 | 
						|
 | 
						|
natural =
 | 
						|
  "0" | positive ;
 | 
						|
 | 
						|
real =
 | 
						|
  [ "-" ] , digit , [ "." , { digit } ] ;
 | 
						|
 |