Re: Formal grammar & syntax of formal languages

SM Ryan <wyrmwif@tsoft.org>
Mon, 07 Jan 2008 01:57:02 -0000

          From comp.compilers

Related articles
Formal grammar & syntax of formal languages sensorflo@gmail.com (Florian Kaufmann) (2008-01-06)
Re: Formal grammar & syntax of formal languages wyrmwif@tsoft.org (SM Ryan) (2008-01-07)
Re: Formal grammar & syntax of formal languages DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-01-07)
Re: Formal grammar & syntax of formal languages mefrill@yandex.ru (mefrill) (2008-01-08)
Re: Formal grammar & syntax of formal languages theochim@it.teithe.gr (2008-01-13)
| List of all articles for this month |

From: SM Ryan <wyrmwif@tsoft.org>
Newsgroups: comp.compilers
Date: Mon, 07 Jan 2008 01:57:02 -0000
Organization: Quick STOP Groceries
References: 08-01-007
Keywords: parse, theory
Posted-Date: 06 Jan 2008 22:46:43 EST

Florian Kaufmann <sensorflo@gmail.com> wrote:


# Is there a difference in meaning between the terms "formal grammar"
# and "syntax of a formal language"? After reading through wikipedia, I
# think they both mean the same thing: The set of rules that specify
# which strings are part of the formal language.


A formal grammar is a formal language to describe a formal language.


A formal language is distinguished from a natural language in that a
formal language can be recognised by some abstract machine up to a
Turing machine (turbocharged or normal). A natural language be the
same or it might transcend the Chomsky hierarchy: it's not yet
provable which way yet. (Everyone knows the answer, but they can't
prove it.)


The ways you are allowed to put together the symbols of a language is
its syntax. You can describe the syntax in a formal language (such as
BNF or vW2 or VDL or whatever gcc accepts), or you can describe the
syntax in natural language. The first would be a formal syntax, the
latter would be an informal syntax. Whether you want the grammar to be
just the syntax or the syntax and semantics, either way you can have a
formal description.


The Algol 68 Revised Report is a formal grammar of a computer
language. ISO/IEC 9899:1999 is combined formal and informal grammar of
C.


--
SM Ryan http://www.rawbw.com/~wyrmwif/
This is one wacky game show.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.