[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison lex matching error
From: |
Sean Walton |
Subject: |
Re: Bison lex matching error |
Date: |
Thu, 26 Oct 2006 11:10:42 -0600 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20050923) |
Sean Walton wrote:
I am having problems with getting Bison to match this:
Modifier module test {
The rule fragment is:
module : ANESC_Modifier MODULE id_name
The lexer tokens are:
ANESC_Modifier = "Modifier"
MODULE = "module"
I get the error:
syntax error before `module'
Any ideas?
-Sean
Here's a larger fragment of the grammar:
dispatch:
DISPATCH_NESC interface { }
| DISPATCH_NESC component { }
///----- ANesC support grammar hooks
------------------------------------------------------------------------------/
| DISPATCH_ANESC anesc_aspect {}
///------------------------------------------------------------------------------------------------------------------/
| DISPATCH_C extdefs {
declaration cdecls = declaration_reverse(*$2*);
parse_tree = CAST(node, cdecls); }
| DISPATCH_C { parse_tree = NULL; }
;
//******************************************************************************************************************/
/****** ANesC Support grammar
************************************************************************************/
/******************************************************************************************************************//
anesc_aspect:
ncheader anesc_configuration
| ncheader anesc_module
;
anesc_configuration:
ANESC_ASPECT CONFIGURATION idword
'{' requires_or_provides_list '}'
IMPLEMENTATION
'{' anesc_iconfiguration '}'
;
anesc_iconfiguration:
configuration_decls /// For
internal wiring (wiring advice??)/
;
anesc_module: /// patterned after 'module' (generics not allowed)/
ANESC_ASPECT MODULE idword
// component_parms nesc_attributes '{' requires_or_provides_list
'}' /// provides advice/pointcuts OR requires advice/pointcuts?/
IMPLEMENTATION
'{' anesc_imodule '}'
// ;