Homec4science

Adding CFG for PHP, C-like languages

Authored by Anh Nhan Nguyen <anhnhan@outlook.com> on Apr 15 2013, 14:01.

Description

Adding CFG for PHP, C-like languages

Summary:
This produces only code that can never survive compile time nor lint/checkstyle.

badassery

Implemented common language traits for C-like languages (I don't consider language derivation, only the looks of code). I learnt today: PHP = C + $ + Classes. I know I forgot many elementary structures like loops, and three-fourth of the OO stuff. Well, it's not like somebody's going to teach programming with this CFG.

I plan to add one or two other languages and make this reasonably generate diffable output (so we don't compare a function with a class).

Test Plan:
P791
P792
P793
Run away, Java: P794

Reviewers: epriestley, chad, btrahan, DeedyDas

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2903

Differential Revision: https://secure.phabricator.com/D5685

Details

Committed
epriestley <git@epriestley.com>Apr 15 2013, 14:01
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU811f7541ddf9: Allow phlog($a, $b)
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU335a24b7a4e4: Adding CFG for PHP, C-like languages (authored by Anh Nhan Nguyen <anhnhan@outlook.com>).Apr 15 2013, 14:01