CS 4.3. (ALEVEL) - Context-Free Languages Flashcards
(5 cards)
1
Q
Context-Free Languages
A
set of strings and symbols that follow rules of a context-free grammar.
-context free grammar = which strings are not possible by laying out production rules
e.g. a → ab
This rule specifies that the a
character can be replaced
by the two characters ab .
2
Q
Backus-Naur Form
A
-way of notating context-free languages
-can use recursion
e.g. <Integer> ::= <Digit>|<Digit><Integer></Integer></Digit></Digit></Integer>
3
Q
Non-terminals
A
- can be broken down further into more non-terminals or terminals
e.g. <FullName> ::= <Title><Forename><Surname></Surname></Forename></Title></FullName>
4
Q
Terminals
A
- cannot be broken down any further, must be taken to be the written value
5
Q
Syntax Diagrams
A
Visual Representation of regular language
- rectangles = non-terminals
- ellipsis = terminals
-