?????????写????????????????????????????????????????????????喂?????????效??????
????????????????????????????????????????写???????????????????????????????????写???小????????????????????????
????????????????????小????霉????????????????????????????????????Abdulaziz Ghuloum?????????????“???????????????”?????????????????????????小???????????????????械???????????????????????????????????????????????????????????械???小????????????????????????????????????????????????????????????????????????????????
?????????????渭???瑁�??写?????C?????????????????????????写???scheme?????????????些???????????????C???????????????????些???????????????????????????????????写?????????????????????????????????小????????????
??????????写??????????????????? babyc???????????????????????????械?????????
????int main() {
????return 2;
????}
??????斜???????泻??????????卸????????????????if???????????校???锌??????????????
?????????????????????未??????????? Flex ?? Bison ????????????????????????????慰?????????????????????????????????????
????"{" { return '{'; }
????"}" { return '}'; }
????"(" { return '('; }
????")" { return ')'; }
????";" { return ';'; }
????[0-9]+ { return NUMBER; }
????"return" { return RETURN; }
????"int" { return TYPE; }
????"main" { return IDENTIFIER; }
????????????????????
????function:
????TYPE IDENTIFIER '(' ')' '{' expression '}'
????;
????expression:
????RETURN NUMBER ';'
????;
???????????????????些??????????????32位??X86?????????????????????????????????????????????????X86????????????
???????????????????????????
????.text
????.global _start # Tell the loader we want to start at _start.
????_start:
????movl    $2??%ebx # The argument to our system call.
????movl    $1??%eax # The system call number of sys_exit is 1.
????int     $0x80 # Send an interrupt
???????????????????????????????位?????写??????????????????????????????????写?????
????Babyc ??????????????????????????????????????