Bnf Grammar For C

This video explains about BNF & EBNF grammar. Clear language is the problem. Formal Language. (*Note: parser allows for an optional ';' to indicate the end. 2 and whose type rules are the same as for the assignment statement example of Section 3. # NOTE WELL: You should also follow all the steps listed in PEP 306, # "How to Change Python's Grammar" # Start symbols for the grammar: # single_input is a single interactive statement; # file_input is a module or sequence of commands read from an input file; # eval_input is the input for the eval() and input() functions. The tools for working with BNF grammars are a little more discoverable (ANTLR, Gold, etc) and usable than for other types of grammars. The second rule says: A list containing the atom 'a' and then only atoms 'a' is also such a list. How community needs impact on career choices. From EBNF to PEG Extended Abstract Roman R. [ b ] is invalid -- cannot have brackets without a comma. How to use a formal grammar. 4 to give + precedence over ∗ and force + to be right associative. First of all, let us define some elements of the grammar:. 以下網頁,含有不適合十八歲以下之未成年人瀏覽之內容 如果你未滿十八歲,請勿進入本站 台灣網站分級推廣基金會TICRF網站. We carry out a specific formal description of. For practical purposes, grammars used with gtools must explicitly declare the distinguished or head symbol of the grammar,. BNF Grammar was a programming task. Used this notation to describe Algol in 1962 A production A → B cDis written in BNF as ::= c. The notation: This is the grammar for a very simple C-like type declaration statement. Part of it can be seen in the as_parser. 1 specifications: Source: The Java Language Specification(1. Argañaráz, Cavadini & Tomasini. It turns out to be easy to make an unambiguous grammar that derives exactly the same sequences of tokens. BNF Grammar for C-Minus 1. the weather is better D. Re: PL/SQL grammar notation APC Jul 11, 2006 4:31 PM ( in response to 247735 ) There is a "fan site" for BNF but it only has a complete set of notation for PL/SQL 2. C++, Visual Basic) need to write down the grammatical rules of that language. An attribute grammar is a device used to describe more of the structure of a programming language than can be described with a context-free grammar. 15 Give translation rules for the EBNF alternatives involving metabrackets and metaparentheses to. invented by John Backus (US, IBM) to describe the syntax of Algol 58. Lya has the essential features of a realistic programming language like pascal, c and others. For each rule which contains a left-recursive option,. Online calculator. It implements ISO Standard Backus-Naur Format, using Java. 4 to give + precedence over * and force + to be right associative. A formal grammar Gis any compact, precise definition of a language L. -- (c) Ulf Persson 2003-- part of BSc thesis at Chalmers University of Technology---- NOTICE: the C program may need to be preprocessed by cpp. It is a context-free grammar that defines syntax rules in terms of terminal characters (the content of the source text) and non-terminal elements (the syntax of the source language). Backus-Naur Form (BNF) The standard technique for defining the syntax of a computer language is to use Backus-Naur Form (BNF). 1 Languages and Grammar. See Listing 1 below. 3+ A pure Python LR/GLR parser with integrated scanner (scannerless). Find all the synonyms and alternative words for bnf at Synonyms. Grammars should only be used to parse text; if you wish to extract complex data, you can add actions within the grammar, or an action object is recommended to be used in conjunction with the grammar. The C-- language has the execution characteristics expected of a C-like block-structured language. The Bison parser reads a sequence of tokens as its input, and groups the tokens using the grammar rules. CS4613 Assignment 3. here you write so many thing And this kind of post are really very necessary for the readers. This package can parse source code in a given language based on the language syntax defined in the BNF format (Backus-Naur Form). If CTTL program needs to parse a context-free language, it invokes a. bnf [](LICENSE) A library for parsing Backus–Naur form context-free grammars inspired by the JavaScript libraries prettybnf and erratic. The grammar is deliberately somewhat conservative, in that it fails to define as valid certain expressions that are so, according to the SQL standard. Today I heard of BNF which is a language for languages. The string can contain any number of occurrences of these three letters (including none) in any order. At 08:24 -0500 2002/02/16, babar haq wrote: >never knew its so easy to get help from a mailing list:) As long as you don't want others to do your work. For used for writing compilers/interpreters that take a description of the grammar in BNF (or EBNF) and produce code that can read in a program and break it down into its syntactic components. For each rule which contains a left-recursive option,. Here is a draft of my proposed BNF for the RRRS appendix. Show the BNF above with the following additional grammar elements: Adjectives: (0 or more Adjectives separated by commas may precede any Noun. 140 hw1 solutions - ECS 140A Programming Languages Winter 2016 Sample Solution Homework#1 1(15 pts Consider the following BNF grammar := a c. import_statement. so we need more details to answer your question. Write a BNF grammar for the for statement of C. Sample grammars at the BNF Web club. BNF uses a small set of symbols to describe a grammar rule. I have found other websites attesting that Ruby version 1. A vertical line "|" indicates alternatives, and [brackets] indicate optional parts. • A BNF EBNF f A BNF or EBNF for one grammar, such as Expp,ffression, different Literals, or if Statement in Java, Exercises 1. P = {S ABC, A aA, A, B bB, B, C cC, C}. • A BNF EBNF f A BNF or EBNF for one grammar, such as Expp,ffression, different Literals, or if Statement in Java, Exercises 1. For those of us who are not computer scientists, a BNF grammar is one kind of formal description of a CFG: Backus Naur Form. session 4 hill air force base clinic. The contents of the environment is a context-free grammar, and the environment will pretty-print it. For example, the strings ab , aaaabbbb , and aaaaaaaabbbbbbbb are in the language nut a, abb , ba , and aaabb are not. This grammar has tokens defined by the lexical grammar as its terminal symbols. The metalanguage is a formal notation for specifying the grammar that describes the syntax of a programming language. But reading a set of BNF rules is difficult since you have to jump from one rule to the next one, maybe pages away from it. terminals, and a finite set Rule of grammar rules, where each grammar rule is of the form (C => X1 … Xn) where C is a non-terminal and each of the Xi is either a non-terminal or a word. Fragments of a BNF Grammar for C: Here we present a small subset of a BNF grammar for the C language, showing several simple notation variations. -> a b | ab. Statement is a single statement, including control statements but excluding block, and block is some code with {} around. Chapter 3 Review. The space between grammar rules can be set with the \grammarparsep length. In fact, if you ask here, you'll. BNF Bank plc is a credit institution licensed by the MFSA to undertake the business of banking in terms of the Banking Act 1994. So I thought of checking it out. package_statement = "package" package_name ";". Find all the synonyms and alternative words for bnf at Synonyms. If you get past the "hills" of troubles with getting a trustworthy grammar, let alone an LALR(1) grammar, you'll discover the semantics of C++ on the other side are rather. They are applied wherever exact descriptions of languages are needed: for instance, in official language. The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, and D, as well as libraries for these languages (libstdc++,). Context-free grammar in C++. You see E + E and E * E. Internet technical specifications often need to define a formal syntax and are free to employ whatever notation their authors deem useful. But it's easy to convert an EBNF Grammar to BNF: Convert every repetition { E } to a fresh non-terminal X and add X = | X E. “Petri Nets for Systems Engineering: A Guide to Modeling, Verification, and Applications (Part II)”, C. XBNF Aim of the XBNF compiler is to be a powerfull BNF like for natural translation uses. c++,parsing,bnf,bnfc. This grammar has tokens defined by the lexical grammar as its terminal symbols. Even programming languages have grammars; here is a link to a formal grammar for the Java language. Rewrite the BNF of Example 3. I am using e for the empty string. Grammar rules of the form. If either is not than an alternatives must be true for x to be true. Wikipedia is the place for that info. Each parser software has different idea of EBNF. In classical BNF, angle brackets surround names of nonterminal symbols, and quotation marks are not needed around terminal symbols, except when the vertical bar is used as a terminal symbol. You can use BNF grammar to determine the exact syntax for any language component and find all available options for any MASM command. It was annotated by hand , however, to identify keywords and syntactic markers (all those tokens marked in red in the BNF). Clear language is the problem. Unlike BNF, this kind of notation does not seem to have a commonly agreed-on name. A formal lan-guage is defined as a set of strings where each string is a seque nce of. This language is very similar to C and has a lot of features in common with a real-world structured programming language. dd t3 = [email protected] t4 = [email protected] A grammar like this can be turned into a "recursive descent parser" (a program) by writing a routine for each non-terminal in the grammar. Grammar Editor. Assume and and are defined elsewhere nonterminals (you dont' define them). RESTRICTION GRAMMAR Restriction Grammar is a grammar-writing framework in PROLOG. – The parse tree is evaluated based on its underlying BNF grammar, wit a possibility of having empty set of attributes values attached to each node. BNF is the standard format for the specification and documentation of programming languages. Given a grammar in BNF or EBNF, you can translate it to a slightly simpler BNF form which obeys certain constraints. The Center for Excellence in Health Care Journalism, the supporting 501(c)(3) for AHCJ, does not accept industry funding. The grammar is deliberately somewhat conservative, in that it fails to define as valid certain expressions that are so, according to the SQL standard. Rewrite the BNF of example 3. We can use finite grammar rules to generate infinite sentences of a language. Backus-Naur Form (BNF) The standard technique for defining the syntax of a computer language is to use Backus-Naur Form (BNF). Because Donald Knuth pointed out that it really isn't a normal form in the sense of providing a unique normalized grammar it is often known as Backus-Naur Form after John Backus the inventor of Fortran and Peter Naur one of the people involved in creating Algol 60. A grammar like this can be turned into a "recursive descent parser" (a program) by writing a routine for each non-terminal in the grammar. What is a grammar ? A grammar is a model of a language, or a language of a language. format and in Backus Naur Form (BNF). There are many variants of BNF. It is very important that the grammar not be ambiguous. // The usual assignment rules apply. :-) >my only problem is to convert this kind of bnf to bison >proto-version = "v=" 1*DIGIT CRLF >The operator "*" preceding an element indicates repetition. BNF for Java is a BNF Compiler-Compiler, or Parser-Generator. What does BNF mean? Information and translations of BNF in the most comprehensive dictionary definitions resource on the web. Syntax – Intro and Overview CS331 Syntax Syntax defines what is grammatically valid in a programming language Set of grammatical rules E. If the language is the set of identifiers, then the terminal set is called the character set of L. Write an attribute grammar whose base BNF is that of Example 3. –BNF description is a bunch of rules (called productions) –Each rule has a symbol called non-terminal on the left side, which is equal to a bunch of symbols called terminals on the right side –So, start from the top (i. At the core of this theory, and much used in the definition of programming languages, is BNF, or Backus Normal Form. Consider the following BNF and answer the questions. Instructor: Dr. misc in June 1990, v13 i52, archive name ansi-c_su. The lexical specifications (such as regular expressions, strings) and the grammar specifications (the BNF) are both written together in the same file. We need to write an additional "C" file containing a call to this function. Ulipristal acetate is a progesterone receptor modulator with a partial progesterone antagonist effect. Show the BNF above with the following additional grammar elements Posted on September 29, 2016 September 29, 2016 by essaygeekblog Assume we start with a simple “sentence” grammar as follows:. Syntax von Pascal In Backus-Naur Form (BNF) ::= program ;. This is in line with the BNF grammar. S is a special variable called the Start symbol, S ∈ N. Yes, it does. misc in June 1990, v13 i52, archive name ansi-c_su. 12/17/2019; 14 minutes to read; In this article. Dave Jones posted a parser as message 91-09-030. 50 KB C was designed for the creation and implementation of low-level systems. Tom Stockfisch reposted both to net. the start symbol) and keep on expanding the non-terminals by substituting their assignment. We picked it because a grammar for a common programming language would be way too complex to serve as an example. A grammar is in BNF (Backus Naur Form) if each rule has exactly one nonterminal on the left hand side BNF is an essential technique for programming language specification Invented by John Backus and Peter Naur. Amada wants to publish her journal there 6. You might also like. [C++] Converting BNF grammar rules into actual C++ functions/code. Backus Naur Form • Backus Naur Form (BNF) iw a standard notation for expressing syntax as a set of grammar rules. Where can I find standard BNF or YACC grammar for C++ language? Ask Question but that is by some arguments better than the context-sensitive grammar of C++. I am implementing a recursive descent parser that recognizes strings in the language below. It will not surprise you to read that it is an extended version of the Backus-Naur form (BNF). BNF Syntax of Ruby Based on http://docs. cundyzheng ♦ March 21, 2013 ♦ Leave a comment. [email protected] cr: Work with (E)BNF and bison/YACC Grammar: Parsing, FIRST/FOLLOW set, CNF, Conversions, LR and LL parsing tables. In computer science, Backus–Naur form or Backus normal form (BNF) is a notation technique for context-free grammars, often used to describe the syntax of languages used in computing, such as computer programming languages, document formats, instruction sets and communication protocols. BNF = Backus-Naur Form (also known as Context-Free Grammars). 1 Examples: 2 RMIM Association rendering. ‹A meta-language is a language used to define other languages ‹A grammar is a meta-language used to define the syntax of a language. bnf grammar. It takes a grammar with syntax rules defined in BNF format and parses the syntax to build a XML parse tree. Write a grammar for the language consisting of strings that have n copies of the letter a followed by the same number. is an ordered "and" where a and c must both be true. The grammar below uses the following BNF-style conventions:. Need help? Post your question and get tips & solutions from a community of 444,529 IT Pros & Developers. The authors of any programming language (e. BNFC C++ mode has been tested to work with Flex version 2. S is a special variable called the Start symbol, S ∈ N. The extension allows certain language rules to be described, such as type compatibility. Is was said that Peter Naur is the one who named it Backus Normal Form. Lya has the essential features of a realistic programming language like pascal, c and others. Find all the synonyms and alternative words for bnf at Synonyms. Given a grammar in (limited) EBNF, this tool will draw the NFA and DFA used in the producing a corresponding LR(0) parser. It reads a grammar file (in an EBNF format) and creates well- commented and readable C# or Java source code for the parser. CS4613 Assignment 3. BNF for Java Example: Canadian Postal Code Example MetaLanguage Extensions in this compiler. Previous message (by thread): [erlang-questions] BNF/EBNF Grammar for Erlang Next message (by thread): [erlang-questions] BNF/EBNF Grammar for Erlang Messages sorted by: I don't think there are any BNF/EBNF grammars for erlang there might be grammars for subsets of the language but not the entire language. Who are language descriptions for?. Bison Grammar Files. This package can parse source code in a given language based on the language syntax defined in the BNF format (Backus-Naur Form). com, the largest free online thesaurus, antonyms, definitions and translations resource on the web. 2) Is there a BNF for RIB floating about? Either an ANTLR or Bison grammar would be great. parse returns a Match. , define the syntax of BNF itself using BNF. If you're interested in create a grammar syntax of specification and protocols, learn these libraries. At the core of this theory, and much used in the definition of programming languages, is BNF, or Backus Normal Form. This BNF definition does not address such pragmatic issues as comment conventions and the use of "white space" to delimit tokens. Appendix C containing the grammar is available in PDF form on the publisher's site. My google-fu doesn't work really well for this topic. 0 Compiler in C. Where can I find standard BNF or YACC grammar for C++ language? Ask Question but that is by some arguments better than the context-sensitive grammar of C++. If action objects are not used,. It fit for foll. The syntax package from the mdwtools bundle has simple ways of typesetting BNF grammars, with some reasonable controls over how the rules are formatted. Do not use the extended BNF notation. 352 ∈ L(G) Means that 352 is a member of the language defined by grammar G. In this Compiler Project, we say: implementation extensions to refer to architectural features such as the Parse Tree and Emitter, and metalanguage extensions to refer to. BNF (Backus Naur Formalism) grammar is extended by semantic structures. A grammar comprises production rules G-3 A Simple Grammar in BNF < s > ::= a b < s > ::= a < s > b S is enclosed by < > which indicates s is a non-terminal A and b are terminal symbols Terminal symbols can never be rewritten G-4 Generating Sentences A grammar can be used to generate a string of symbols called a sentence. A C union definition e. Lecturas sobre la lingüística maya (1990) with Nora C. I am using e for the empty string. The grammar is described in detail throughout the standard and is summarized in Appendix A: Grammar Summary (it's Appendix A in both the C++03 standard and the C++0x final committee draft). The C-- language has the execution characteristics expected of a C-like block-structured language. Chomsky called the inductive definition a grammar. For practical purposes, grammars used with gtools must explicitly declare the distinguished or head symbol of the grammar,. But basically, BNF is just a standard syntax to write context-free (CF) grammars. Even programming languages have grammars; here is a link to a formal grammar for the Java language. aParse reads grammar files that comply with RFC 5234 but with the following deviations. Purpose of this document. The improved online BNF is on the new MedicinesComplete site. Chomsky Normal Form or Greibach Normal Form. BNF is also known as Backus-Naur form. If all the attribute values in a parse tree have been computed, the tree is said to be fully attributed. • It is often used to describe the syntax of languages us. Through a web IDE, the compiler under discussion has been used by researchers [5] and by educators for teaching reasoning principles in a variety of CS courses at Clemson and elsewhere for over 5 years [6]. Grammar: Basic Elements. html ] For information on semantics and pre-defined classes follow these pointers: [java. Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications. Parses EBNF grammar, creates parsing diagram, FIRST and FOLLOW sets and generates code for parser. It is processed from the BNF as published in the IEEE 1800-2012 SystemVerilog standard. Jison is a parser generator written in JavaScript. With this grammar, there is a choice of variables to expand. But it's easy to convert an EBNF Grammar to BNF: Convert every repetition { E } to a fresh non-terminal X and add X = | X E. c is a boop and any boop is also a bop and a pop. (HTML is not defined with a grammar, instead it is defined with an SGML DTD, which is sort of a higher-level grammar. Earley, Jay C. Clear language is the problem. However, it does not increase the expressive power of grammars, that is, any grammatical structure that can be expressed in EBNF can also be expressed in BNF if one is willing to use more productions. 2 Elimination of Left-Recursion There is a formal technique for eliminating left-recursion from productions. They are applied wherever exact descriptions of languages are needed: for instance, in official language. But I don't understand what the first two lines mean:. This page uses Jison to display an interactive parsing table based on the grammar and parsing algorithm chosen, which can be very helpful for debugging. Rewrite the BNF of Example 3. I'm trying to create a recursive descent parser. Once you have the BNF there will be a single routine corresponding to each left-hand-side (LHS) item or "production" in the grammar, which will end up calling the routines corresponding to each entry on its right-hand-side (RHS). He also points out that BNF is not a "Normal Form", which would imply there were some restrictions on how a grammar could be written down, as in e. BNF 402 Lexical Grammar definitions and case-body). - Sebastian Am 27. 4 to give + precedence over * and force + Write a BNF description of the Boolean expressions of Java, including. dd t5 = bill t6 = @x. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page. This grammar is NOT a BNF grammar. Once defined, the grammar can be taken and used to create a complier. Another Compiler Compiler") parse grammer. latex-bnf – L a T e X macros for typing BNF specifications The package defines an environment grammar. (c) What is the start symbol? (d) Draw a parse tree for the sentence (x). ) Write a grammar for the language consisting of strings that have n. If the grammar were ambiguous, programs. BNF Grammar for ISO/IEC 9075:1992 - Database Language SQL (SQL-92) Cross-Reference: rules Cross-Reference: keywords The plain text version of this grammar is sql-92. [techspeak] Acronym for `Backus Normal Form' (later retronymed to ` Backus-Naur Form ' because BNF was not in fact a normal form), a metasyntactic notation used to specify the syntax of programming languages, command sets, and the like. Backus–Naur Form. This notation, invented by John Backus and further improved by Peter Naur, was first used to describe the syntax of the Algol programming language. // The usual assignment rules apply. Programming Implementation BNF Additional Grammar Posted on September 29, 2016 September 29, 2016 by essaygeekblog Assume we start with a simple “sentence” grammar as follows:. ) You can see a collection of BNF grammars at the BNF web club. A library for parsing Backus–Naur form context-free grammars inspired by the JavaScript libraries prettybnf and erratic. Write the corresponding recursive descent parser, and try it on some correct strings, and some badly built ones. To handle operator precedences, we need a more complex grammar:. To deal with the whole problem of describing and compiling artificial languages we had to invent a new subject - computational grammar. suggests it stand for Backus-Naur form instead • This was for two reasons: • To recognize Naur's contribution • BNF is not technically a "normal form"; this would imply that there would be only one correct way of writing a grammar. It reads a grammar file (in an EBNF format) and creates well- commented and readable C# or Java source code for the parser. In the United States, catalog is the most common way to spell the word. Also types defined-- by typedefs have to be eliminated (these are known problems with the-- BNF grammar of Ansi C). Clear language is the problem. new line tokens are excluded (new lines are not allowed in some places, see source grammar files for details). Ask Question Asked 6 years, 10 months ago. Obviously, it does not tell which operator, + or *, has higher precedence. C float literals 3. Backus-Naur-Form Grammar of C language variable declaration? Unanswered Questions. com/ruby/ruby-man-1. } where ε represent empty string (in case 0 vowels and o consonants ) Regular Grammar : A grammar is regular if it has rules of form A -> a or A -> aB or A -> ɛ where ɛ is a special symbol called NULL. First encode operator precedence by picking one nonterminal for each level of operator precedence, using the given R for the least binding such level: R = R&R jS S = S S jS S jT T = T jU. For those of us who are not computer scientists, a BNF grammar is one kind of formal description of a CFG: Backus Naur Form. Terminal and non-terminal symbols are an aspect of a grammar, not of a language. It aims to be directly and immediately useful, and it embodies a powerful model of language. The grammar presented in this chapter is the basis for the reference implementation. Tom Stockfisch reposted it to net. For example, (()(())) is balanced, but )( and ())()( are not balanced. That is, the nonterminal is in the correct context. 1 Grammar in Lemon format. BNF (Backus-Naur Form) is equivalent to context-free grammars used for describing syntax. What is the pass marks for inter 1st year sanskrit. Today I heard of BNF which is a language for languages. Write a BNF grammar for the for statement of C. Explanation of parser trees and syntax trees are also included in this video. It is used to describe more of the structure of a programming language than can be described with context-free grammar. Where can I find standard BNF or YACC grammar for C++ language? Ask Question but that is by some arguments better than the context-sensitive grammar of C++. This appendix provides a complete description of symbols, operators, and directives for MASM 6. At 08:24 -0500 2002/02/16, babar haq wrote: >never knew its so easy to get help from a mailing list:) As long as you don't want others to do your work. There exist multiple right-most or. We carry out a specific formal description of. Each production starts with an element (typically constructed with nonterm) for the non-terminal being defined, and then a list of possibilities (typically constructed with BNF-seq, etc. For example, the syntax specifies how ring-closure digits are written, but. Given a Labelled BNF grammar the tool produces: an abstract syntax implementation. In the extended BNF for Java the optional appearance of X is written X?, and the symbols { and } are used only as terminals (i. For used for writing compilers/interpreters that take a description of the grammar in BNF (or EBNF) and produce code that can read in a program and break it down into its syntactic components. Appendix A. ) You can see a collection of BNF grammars at the BNF web club. bnf file and generate the output "C" parser, bnf defines a "C" function called sample() and the body of that function parses the input we want. 0 Compiler in C. I am using e for the empty string. Statement is a single statement, including control statements but excluding block, and block is some code with {} around. Grammar rules of the form. Find out more about how this works in today's random Wednesday tutorial! Content from Wikipedia. BNF Bank plc is a credit institution licensed by the MFSA to undertake the business of banking in terms of the Banking Act 1994. GOLD grammars are based on Backus-Naur form and regular expressions. The Clite grammar fits on one page (next 3 slides), so it’s a far better tool for studying language design. Another Compiler Compiler") parse grammer. Ambiguity in Context-Free Grammars - If a context free grammar G has more than one derivation tree for some string w ∈ L(G), it is called an ambiguous grammar. Appendix A. Anyone know where I can get a (E)BNF like grammar for C++ to possibly use either for analysis or for yacc/bison(++)? Most people that try this think the issue is the grammar. parse2 produces the aParse parser generator that reads Augmented BNF grammars and produces Java, C++ or C# classes that can build parse trees for valid instances of those grammars. Invitation to Computer Science, C++ Version, Third Edition 17 Grammars, Languages, and BNF (continued) In BNF The syntax of a language is specified as a set of rules (also called productions) A grammar The entire collection of rules for a language Structure of an individual BNF rule left-hand side ::= “definition”. The type userdata is provided to allow arbitrary C data to be stored in Lua variables. jrester/EBNF. Any grammar expressed in BNF is a context-free grammar. The notation: This is the grammar for a very simple C-like type declaration statement. BNF is also known as Backus-Naur form. If that doesn't sound abstract enough for you, a grammar doesn't have to be a programming language or even a human language -- it can be any syntax that you want to describe. compilers newsgroup that gives a different view of Naur's contribution. ANSI C++ grammar? COBOL grammar? PL/I grammar? Ada 95 grammar? (And so on. We need to write an additional "C" file containing a call to this function. BNF for Java Example: Canadian Postal Code Example MetaLanguage Extensions in this compiler. You see E + E and E * E.