C- (Cminus) is a subset of C which I played around to set up my compiler. It supports arrays, function calls, if-else and loop statement. The major (or say the ONLY) data type supported is int.&n
This is a simple sample how Lex and Yacc cowork. 1) The agreement is Yacc gets tokens by calling a function called yylex(). We define Yacc's yylex() to be static who just calls Lex'
I use MIPS as the target language for my C- language. SPIM is a simulator for MIPS. A SPIM Program must include a label “main” – this will be called by the SPIM startup code (a
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号