From 6738591a229c728ab9d64192e197ac93645a8897 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 May 2000 07:10:50 +0000 Subject: added primitive define macros started converting matty's srvsvc.idl to a .struct file (This used to be commit cf8d4c42e259d65d4d16c91316acc0bad71ff177) --- source3/aparser/token.awk | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'source3/aparser/token.awk') diff --git a/source3/aparser/token.awk b/source3/aparser/token.awk index a64700f536..d0703439e9 100644 --- a/source3/aparser/token.awk +++ b/source3/aparser/token.awk @@ -10,6 +10,12 @@ function parse_error(msg) { next; } +/^\#define.*;/ { + split($0,a,"[ \t;]*"); + parse_define(a[2], a[3]); + next; +} + # ignore comments /^[ \t]*\#/ { next; @@ -34,13 +40,6 @@ function parse_error(msg) { next; } -/^[ \t]*typedef.*;/ { - {if (current_struct!="") parse_error("typedefs must be global");} - split($0,a,"[ \t;]*"); - parse_typedef(a[2], a[3]); - next; -} - /^[ \t]*struct.*\{/ { {if (current_struct!="") parse_error("you cannot have nested structures");} start_struct($2); @@ -76,8 +75,8 @@ function parse_error(msg) { } /^[ \t]*\} .*;/ { - split($0,a,"[ \t;]*"); - end_struct(a[2]); + split($2,a,"[ \t;]*"); + end_struct(a[1]); next; } -- cgit