Buscar

What is the general functioning of bottom-up or LR parsers in syntactic analysis? They work with LR grammars and build the derivation tree from th...

What is the general functioning of bottom-up or LR parsers in syntactic analysis?

They work with LR grammars and build the derivation tree from the leaves to the root.
They search for a substring that can be replaced by its origin symbol in the grammar.
They read the input text from left to right and produce a more left derivation.
They start from the root of the derivation tree towards the leaves, replacing non-terminal symbols to obtain the desired string.

Essa pergunta também está no material:

Análise Sintática - Aula 03
95 pág.

Direito Penal I Universidade Estácio de SáUniversidade Estácio de Sá

💡 1 Resposta

User badge image

Ed Verified user icon

A análise sintática é uma das etapas do processo de compilação de um programa. O objetivo é verificar se o código fonte está escrito de acordo com a gramática da linguagem de programação. Os parsers bottom-up ou LR trabalham com gramáticas LR e constroem a árvore de derivação das folhas para a raiz. Ou seja, eles começam a partir dos símbolos terminais e vão construindo a árvore até chegar ao símbolo inicial. A alternativa correta é: "They work with LR grammars and build the derivation tree from the leaves to the root."

0
Dislike0

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais