|
From: | Hans Aberg |
Subject: | Re: Actions for Javas class_declaration |
Date: | Thu, 20 Nov 2008 09:47:32 +0100 |
On 20 Nov 2008, at 09:05, Andreas Leppert wrote:
I've seen this which stands for a Java Class Declaration: class_declaration: modifiers CLASS_TK identifier super interfaces { create_class ($1, $3, $4, $5); } class_body {;} | CLASS_TK identifier super interfaces { create_class (0, $2, $3, $4); } class_body {;} ...I have problems to understand the semantic action {;}. Does it mean "donothing" ? Why just not leave it blank?
It depends on how the Java parser is implemented. The C/C++ parsers implement a 'switch' statement, which must have ";", but inserts one, so it isn't needed. Thus, "{}" or nothing works fine. Check if it works in the Java parser (for example, look into the code that Bison writes), and if not, report it to Bug-Bison.
Hans
[Prev in Thread] | Current Thread | [Next in Thread] |