From 3902cb2fcae6e2028252b5d2016bf0e99ed74980 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Fri, 4 Nov 2022 01:29:37 -0400 Subject: Add support to define structures in mig. Basic syntax is presented below and allows users to define nested structured types by using simpler or structure types as members. Mig will use the C padding and alignment rules to produce the same size as the corresponding C structures. type timespec_t = struct { uint32_t tv_sec; uint32_t tv_nsec; }; This allows us to build stubs that are more easily adaptable to other architectures. Message-Id: --- lexxer.l | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lexxer.l') diff --git a/lexxer.l b/lexxer.l index 71f43b2..508603a 100644 --- a/lexxer.l +++ b/lexxer.l @@ -204,6 +204,8 @@ static void doSharp(const char *body); /* process body of # directives */ ">" RETURN(syRAngle); "[" RETURN(syLBrack); "]" RETURN(syRBrack); +"{" RETURN(syLCBrack); +"}" RETURN(syRCBrack); "|" RETURN(syBar); {Ident} { yylval.identifier = strmake(yytext); -- cgit v1.2.3