Mercurial > repos > rhope
diff backendutils_c.rhope @ 100:f51c4c17457c
Broken port of parser to compiler
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 09 Aug 2010 02:03:57 -0400 |
parents | e09c2d1d6d5b |
children | b7df624895b2 |
line wrap: on
line diff
--- a/backendutils_c.rhope Fri Aug 06 01:42:37 2010 -0400 +++ b/backendutils_c.rhope Mon Aug 09 02:03:57 2010 -0400 @@ -1,11 +1,18 @@ -Escape Rhope Name[name:escaped] +Escape Rhope Name[name:out] { escaped <- [name]Replace[ ("_", "@", " ", ":", "?", "+", "-", "*", "/", "<", ">", "(", ")", "!", "=", "'", - "\"", "\t", ",", ".", "\n", "{", "}", "[", "]", "#", "\\", "\r", ";", "&", "|", "%", "^"), + "\"", "\t", ",", ".", "\n", "{", "}", "[", "]", "#", "\\", "\r", ";", "&", "|", "%", "^", "`", "~"), ("UN_","AT_","SP_","CN_","QN_","PL_","MN_","TM_","DV_","LT_","GT_","LP_","RP_","NT_","EQ_","PR_", - "DP_","TB_","CM_","PD_","NL_","LC_","RC_", "LS_", "RS_", "HS_", "BS_", "CR_", "SC_", "AM_", "PI_", "PC_", "CT_")] + "DP_","TB_","CM_","PD_","NL_","LC_","RC_", "LS_", "RS_", "HS_", "BS_", "CR_", "SC_", "AM_", "PI_", "PC_", "CT_", "BT_", "TD_")] + + [("char","int","short","long","float","double","void","struct")]Find[=[escaped, ?]] + { + out <- ["ID_"]Append[escaped] + }{ + out <- Val[escaped] + } } Blueprint AddRef