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 .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Terminals

A
  • cannot be broken down any further, must be taken to be the written value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Syntax Diagrams

A

Visual Representation of regular language
- rectangles = non-terminals
- ellipsis = terminals
-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly