EBNF

EBNF(Extended BNF, extended Backus–Naur form)는 BNF에 메타 기호를 추가하여 규칙을 더 간결하게 표현할 수 있도록 확장된 BNF이다. 4가지 메타 기호가 추가되었다. 메타구문 표기법 계열로, 문맥 자유 문법을 표현하는 데 사용할 수 있다. EBNF는 컴퓨터 프로그래밍 언어와 같은 형식 언어를 형식적으로 설명하는 데 사용된다. 이는 기본 BNF(배커스-나우르 형식) 메타 구문 표기법의 확장이다.

최초의 EBNF는 니클라우스 비르트에 의해 개발되었으며 비르트 구문 표기법의 일부 개념(다른 구문 및 표기법 포함)을 통합했다. 오늘날 EBNF의 다양한 변형이 사용되고 있다. 국제 표준화 기구는 1996년에 EBNF 표준인 ISO/IEC 14977을 채택했다. 그러나 자이체프(Zaytsev)에 따르면 이 표준은 "혼돈에 또 다른 세 가지 방언을 추가했을 뿐"이며 성공이 부족하다는 점을 지적한 후 다음과 같이 언급했다. ISO EBNF는 모든 ISO 표준에서 사용되지도 않는다. 휠러(Wheeler)는 EBNF를 사용할 때 ISO 표준을 사용하는 것에 반대하며 W3C XML(Extensible Markup Language) 1.0(5판)의 표기법과 같은 대체 EBNF 표기법을 고려할 것을 권장한다.

이 문서에서는 모든 EBNF에 적용되는 예에 대해 ISO에서 지정한 대로 EBNF를 사용한다. 다른 EBNF 변형은 다소 다른 구문 규칙을 사용한다.

구분 메타기호 의미
BNF ::= 정의
BNF | 택일(OR)
BNF <> 비단말 기호
EBNF [ ] 생략 가능
EBNF { } 0번 이상 반복
EBNF ( ) 와 함께 쓰임
EBNF ' ' 메타 기호 자체를 단말 기호로 사용

같이 보기

외부 링크

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.