Differences

This shows you the differences between two versions of the page.

Link to this comparison view

alf:res:subiecte [2017/05/18 02:14]
alexandru.radovici created
alf:res:subiecte [2017/05/18 02:59] (current)
alexandru.radovici
Line 6: Line 6:
 </​center>​ </​center>​
 </​html>​ </​html>​
 +
 +  - Écrivez un AFN qui accepte (aabb)|(a(ab)*a). Transformez-le en un AFD.
 +  - Écrivez l'​expression régulière d'un domaine Internet
 +  - Ecrivez la grammaire LL / LR pour la langage suivante<​code>​
 +[object methodParameterName1:​parameter1 parameterName2:​parameter2 parameterName3:​parameter3 ...]
 +</​code>​
 +  - Ecrire un analyseur LL pour la grammaire suivante (FIRST, FOLLOW) <​code>​
 +S -> select F from id
 +S -> select F from id where E
 +F -> id, F
 +F -> id
 +F -> epsilon
 +T -> id
 +E -> id op E
 +E -> id
 +E -> number
 +</​code>​
 +  - Ecrire un analyseur LR pour la grammaire suivante (FIRST, FOLLOW) <​code>​
 +S -> select F from id
 +S -> select F from id where E
 +F -> id, F
 +F -> id
 +F -> epsilon
 +T -> id
 +E -> id op E
 +E -> id
 +E -> number
 +</​code>​
 +  - Prouvez que la grammaire suivante n'est pas LL (0) / LR (0) <​code>​\
 +E -> E + E
 +E -> id
 +E -> number
 +</​code>​
 +  - Ecrivez l'​arborescence pour la grammaire et la chaîne suivantes <​code>​\
 +E -> E + E
 +E -> id
 +E -> number
 +(2-4+((5*6)+6))*67*7
 +</​code>​
 +  - Ecrivez l'AST pour le code source suivant<​code>​
 +var s = readNumber ()
 +for (i=0; i<s; i++)
 +{
 +  write (i*i);
 +}
 +</​code>​
 +  - Ecrivez le Three Address Code pour le code source suivant<​code>​
 +var s = readNumber ()
 +for (i=0; i<s; i++)
 +{
 +  write (i*i);
 +}
 +</​code>​
 +  - Ayant le langage d'​assemblage suivant, écrivez le code source suivant<​code>​
 +mov alu, value ; alu = value
 +mov alu, reg ; alu = reg
 +mov reg, alu ; reg = alu
 +add reg ; alu = alu + reg
 +sub reg ; alu = alu - reg
 +mul reg ; alu = alu * reg
 +div reg ; alu = alu / reg
 +
 +2+3*(6+7)
 +</​code>​
 +  - Allouert les variables suivantes<​code>​
 +struct ​
 +{
 +  int n1;
 +  int n2;
 +  int n3;
 +  int f[70]
 +} s;
 +
 +s *s1, s2, s3[75], s4;
 +</​code>​
 +  - Ecrivez le diagramme de flux de contrôle pour le code source suivant<​code>​
 +var s = 0;
 +while (s<1000)
 +{
 +  s = s + 1;
 +  if (s%6 == 0) s = s + 4;
 +  else s = s * 3;
 +}
 +</​code>​
alf/res/subiecte.1495062848.txt.gz · Last modified: 2017/05/18 02:14 by alexandru.radovici
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0