Lecture 3 - Parsing Flashcards

1
Q

A ? is a formal language used to communicate algorithms both from programmer to programmer and from programmer to machine.

Syntax

A

programming language

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

(3) A formal language consists of:

Syntax

A
  • A set of symbols
  • Rules for forming term
  • Rules for transforming terms to terms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

(3) To use programming language effectively, the following must study and understand it from three perspectives:

Syntax

A
  • Syntax
  • Semantics
  • Pragmatics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

?

the set of symbols and rules for forming terms

Three perspectives

Syntax

A

Syntax

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

?

the rules for transforming terms to terms

Three perspectives

Syntax

A

Semantics

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

?

using the particular constructs of the language

Three perspectives

Syntax

A

Pragmatics

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

In ?, a language is defined as a set of strings of symbols that may be constrained by specific rules.

Context Free Language

A

formal language theory

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

Similarly, the written ? is made up of groups of letters (words) separated by spaces

Context Free Language

A

English language

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

A valid (accepted) sentence in the language must follow particular rules, the ?

Context Free Language

A

grammar

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

?

If L and P are CFL, then L∪P is also a CFL

Closure Properties

Context Free Language

A

Union

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

?

if L and P are CFL, then LP is also CFL

Closure Properties

Context Free Language

A

Concatenation

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

?

if L is CFL, then L* is also CFL

Closure Properties

Context Free Language

A

Kleene Star

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

?

can generate context-free languages.

Closure Properties

Context Free Grammar

A

Context-free grammar

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

They do this by taking a set of variables which are defined ?, in terms of one another, by a set of production rules.

Closure Properties

Context Free Grammar

A

recursively

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

?

is defined by 4 tuples as G = {V, ∑, S, P} where

Closure Properties

Context Free Grammar

A

Context-Free Grammar

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

?

is a notation for expressing CFG

A

Backus-Naur Form

17
Q

(4) Notations

Backus-Naur Form

A
  • Non-terminals
  • Alteration
  • Terminal
  • Replacement
18
Q

?

are denoted by surrounding symbols <>

Notations

Backus-Naur Form

A

Non-terminals

19
Q

?

is denoted by |

Notations

Backus-Naur Form

A

Alteration

20
Q

?

set of terminal symbols or lexemes

Notations

Backus-Naur Form

A

Terminal

21
Q

?

is denoted by ::= or . These are the productions or Production Rule

Notations

Backus-Naur Form

A

Replacement