














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















context-free grammars
programming languages ambiguously, i.e.,with English
-^
Backus invented FORTRAN (“FORMulaTRANslator”), the first high-level language ever
, circa 1954
-^
Major influence on the invention offunctional programming in 1970’s
-^
Won the 1977 Turing Award for BNF andFORTRAN
scientist
“:=” instead)
people added their own extensions
he published “What Can We Do About theUnnecessary Diversity of Notation forSyntactic Definitions” in Communicationsof the ACM in 1977
symbols (0 or 1 occurrences), “{ .. }” for 0or more occurrences.
-^
Born in Switzerland, 1934
-^
Desgined Pascal (1970),Modula, Modula-2 (1980),and Oberon (1988)
-^
Won the Turing Award in 1984
-^
Won the IEEE ComputerPioneer Award in 1987
regular expression syntax
” (The Kleene Star): means 0 or more occurrences
” (The Kleene Cross): means 1 or more occurrences
”: means 0 or 1 occurrences (sometimes “[ … ]” used instead)
|
|
'4' | '5' | '6' | '7' | '8' | '9'
|
-^
You can replace it with:
You can replace it with:
s_expression ::= atomic_symbol
| "(" s_expression "." s_expression ")"| list
list ::= "(" s_expression ")"atomic_symbol ::= letter atom_partatom_part ::= empty*
| letter atom_part| number atom_part
letter ::= "a" | "b" | " ..." | "z"number ::= "1" | "2" | " ..." | "9"
-^
BNF uses following notations:
(i) Non-terminals enclosed in
<
and
>
.
(ii) Rules written as
X
::=
Y
(1)
X
is LHS of rule and can only be a NT.
(2)
Y
is RHS of rule:
Y
can be
(a) a terminal, nonterminal, or concatenation of terminal
and nonterminals, or (b) a set of strings separated by alternation symbol
|.
Example: < S >
::=
a < S > |a
-^ Notation
ε
: : Used to represent an empty string (a string of
length 0).