COMPORT – Compilador Portugol - Nilo Menezes
COMPORT – Compilador Portugol - Nilo Menezes
COMPORT – Compilador Portugol - Nilo Menezes
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
ComPort <strong>–</strong> <strong>Compilador</strong> <strong>Portugol</strong><br />
2.11. Módulos ...................................................................................................................39<br />
2.12. Funções pré-definidas ............................................................................................39<br />
2.13. Especificação BNF ..................................................................................................40<br />
3. O COMPILADOR PORTUGOL ...........................................................................43<br />
3.1. Analisador Léxico.......................................................................................................43<br />
3.2. Analisador Sintático ...................................................................................................43<br />
3.3. Gerador de Código .....................................................................................................43<br />
3.4. Funções Adicionais .....................................................................................................43<br />
4. A MÁQUINA VIRTUAL........................................................................................44<br />
4.1. Registradores ..............................................................................................................44<br />
4.2. Formato de Instruções ...............................................................................................45<br />
4.3. Instruções ....................................................................................................................46<br />
4.4. Limitações ...................................................................................................................48<br />
4.5. Implementação............................................................................................................48<br />
CONCLUSÃO .............................................................................................................49<br />
REFERÊNCIA BIBLIOGRÁFICA ...............................................................................50<br />
APÊNDICE A <strong>–</strong> CÓDIGO FONTE ..............................................................................51<br />
SCANNER.H...........................................................................................................................51<br />
SCANNER.CPP ......................................................................................................................55<br />
PARSER.H ..............................................................................................................................65<br />
13