análisis sintáctico descendente sin retroceso - Blearning
análisis sintáctico descendente sin retroceso - Blearning
análisis sintáctico descendente sin retroceso - Blearning
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Tratamiento de errores <strong><strong>sin</strong>táctico</strong>s<br />
Recuperación de errores en ASD recursivos<br />
Estos procedimientos se utilizan como sigue en los procedimientos exp y factor:<br />
procedimiento exp(synchset);<br />
begin<br />
checkInput ({(,numero}, synchset);<br />
if not (token in synchset) then<br />
term (synchset);<br />
while token = + or token = - do<br />
match (token);<br />
term (synchset);<br />
end while;<br />
checkInput(synchset, {(,numero});<br />
end if;<br />
end exp;<br />
procedimiento factor(synchset);<br />
begin<br />
checkInput ({(,numero}, synchset);<br />
if not (token in synchset) then<br />
case token of<br />
( : match (();<br />
exp ({)});<br />
match ());<br />
numero:<br />
match(numero);<br />
else error;<br />
end case;<br />
checkInput(synchset, {(,numero});<br />
end if;<br />
end factor;<br />
Página 68