Formal Languages and Compilers Exam 2 Terms

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:32 PM on 4/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

14 Terms

1
New cards

Context Free Grammar

A formal grammar whose production rules can be applied to non-terminal symbols regardless of the context.

2
New cards

Formal grammar

set of production rules that define the set of strings in the language

3
New cards

Production rules

rules to write strings using terminal and non-terminal characters

4
New cards

terminal symbol

a symbol that belongs to the alhpabet of the language

5
New cards

non-terminal symbol

a symbol that does not belong to the language

6
New cards

A CFL is the language L(G) __________________

Derived from a context free grammar G

7
New cards

CFG G=(_________)

V, E, S, P where v= finite set of non terminal chars E= finite set of terminal characters S=start symbol P=production rules

8
New cards

CFLs are closed under what

Union, concatenation, and Kleene star

9
New cards

all regular languages are ________

context free

10
New cards

A language is regular when_________________

there exists a regular grammar for it

11
New cards

what defines ambiguity

A CFG is ambiguous if there is at least one string in the language that has two or more derivation trees

12
New cards

How is ambiguity handled

Not all grammars can be made unambiguous. YACC can handle ambiguous grammars.

13
New cards

PDA

Machine that determines if the rules of a are being followed by and example text.

14
New cards

The Stack

A form of memory for the pda