/* yes, this is exported! */
bool g_expectingTypeName = TRUE; /* beginning of file can be type name! */
+static bool expectingMetaStateName = FALSE;
+
static int returnInt (ctype, long);
static int returnFloat (ctype, double);
static int returnChar (char);
}
else
{
- annotationInfo ainfo = context_lookupAnnotation (id);
+ annotationInfo ainfo;
+
+ if (expectingMetaStateName)
+ {
+ metaStateInfo msinfo = context_lookupMetaStateInfo (id);
+
+ if (metaStateInfo_isDefined (msinfo))
+ {
+ yylval.msinfo = msinfo;
+ return METASTATE_NAME;
+ }
+ else
+ {
+ DPRINTF (("Not meta state name: %s", cstring_toCharsSafe (id)));
+ }
+ }
+
+ ainfo = context_lookupAnnotation (id);
if (annotationInfo_isDefined (ainfo))
{
return (processIdentifier (makeIdentifier (yytext)));
}
}
+
+void cscanner_expectingMetaStateName ()
+{
+ llassert (!expectingMetaStateName);
+ llassert (context_inFunctionHeader ());
+ expectingMetaStateName = TRUE;
+}
+
+void cscanner_clearExpectingMetaStateName ()
+{
+ llassert (expectingMetaStateName);
+ expectingMetaStateName = FALSE;
+}