g_scanner scan for closed symbol



Dear friends,
I am working with bibtex files, whose structure is:
@type{id
 key=val;
...
...
}
now, key and val can be many thing, and val can be written as "val",
{val} or "{val}" and all are correct.

So, while scanning the file, I can only determine if a file is closed by
checking if all "{"-"}" pair is closed,  just peeking something like:

 g_scanner_peek_next_token (scanner);
      if (scanner->next_token == G_TOKEN_RIGHT_CURLY)
 break;

is not enough; I need something which will check if *ALL* LEFT_CURLY is
closed. Any easy way of doing this?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]