Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Quiz4-result

Quiz4-result

Ratings: (0)|Views: 3|Likes:
Published by api-3812391

More info:

Published by: api-3812391 on Nov 25, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Quiz 4, Compiler Construction, 1.6.08
\u206a: check one ore more, O: check only one in choice
Name____________________________________________ Number___________________
1) Fill up the picture of tasks creating
a scanner using LEX(5p)

2) lexemes can be defined in a simple
way using
X regular expression
O BNF
O context free grammars

3) LEX input consists of X declarations of pattern X %% as a separator

\u206asyntax rules
X declarations of variables
\u206a$$ as a separator
\u206atranslation rules, pattern to token
X translation rules, pattern to action
X declaration of auxiliary functions

4) L+ is
X the Kleene closure without L0
O a variable named L which is added to somewhat
O a set with 0 ore more repetitions of L

5) the regexpr matching a float number is
X {digit}+(\.{digit}+)?(E[+-]?{digit})?
O (digit)+(\.(digit)+)?(E[+-]?(digit))?
O {digit}?(E[+-]?{digit})?

6) How is usually the scope of a variable stored?
O using an attribute describing the scope
X chaining symbol tables
O by renaming variables (appending 1, 1.1, 1.1.1\u2026)

7) A while loop during syntax tree construction is stored as
X a special operator object with two parameters
O a special while object without any parameter
O an object with tree parts

8) An L value is an
O index
O value
X address

9) The left side of the assignment "a[i+2]= j*2" contains
O an L value
O an R value
X an L value and an R value

Lex
Compil
er

Lex Source
p
ro
g
ram
lex.
y y
.c

C
Compil
er

lex.
y y
.c
a.out
a.out
in
p
ut stream
Se
q
uence of

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->