Week 3 Notes


Grammars Continued | CS 3040

Date 09/19/2022
Topic Fluent APIs
Professor Dr. Hasker
Week 3

Terminals

Things that aren't substituted

Definitions

Definition 6.1 (Context-free grammar (CFG)).

Definition 6.2 (Context-free derivation):

Expression => Term => Factor * Term => Constant * Term => Digit * Term

Definition 6.3 (Language generated by a CFG):

The start is always not a terminal.

Definition 6.4 (Well-formed CFG):

Every non-terminal is useful.

Grammars Continued | CS 3040

Date 09/20/2022
Topic Grammars
Professor Dr. Hasker
Week 3

Extended BNF (EBNF)

stmt -> Variable '=' expression';'
stmt -> 'return' Expression';'
stmt -> 'ident' '(' ExpressionsList ')' ';'
ExpressionList -> epsilon | Expression (',' Expression)* 
...

Are there non-context sensitive languages?

Chomsky Hierarchy:

EBNF vs. BNF

A -> a A' B
A' -> y | epsilon

Other ways

Grammars | CS 3040

Date 09/21/2022
Topic Grammars
Professor Dr. Hasker
Week 3

Ambiguous Grammars

Meta-meta-level Languages

Haskell?

Haskell | CS 3040

Date 09/22/2022
Topic Haskell
Professor Dr. Hasker
Week 3

(Haskell Discussion)