Regex and BNF Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is BNF

A

the formal notation used to describe the syntax rules of a language

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

Why do we need to use bnf

A
  • some expressions cant be expressed with regEx or FSMs
  • this class of languages called context free languages are more expressive than regular langs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

::=

A

equals to

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

<>

A

surrounds category names

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

what are terminal symbols
what are non terminal symbols

A
  • terminal elements can be broken down
  • non terminal cant be broken down
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is parsing

A

checking an input string against the set of BNF rules to see if its valid

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

parts of a syntax diagram and what are they used for

A

elipse - represents a terminal symbol
rectangle - a non terminal symbol
arrow under rectangle - non terminal element that may be used more than once

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

what is syntax

A

strict rules a program must follow regarding their structure

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

what does bnf consist of

A
  • set of terminal symbols
  • set of non terminal symbols
  • set of production rules
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what type of language is BNF

A

meta language

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