dcsimg
c++ like structs and nondeterminisms
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Igor_GIE
Posted On:   Wednesday, January 12, 2005 11:40 AM

Hello. I'm trying to parse c++ like structs but i wasn't not able to avoid nondeterminism warnings trying to implement c++ access specifiers. what i want to parse (for ex.) is something like this: interface if1 { private: //definitions public: private: } ; I've got grammar like this aggregate_definition : KW_INTERFACE IDENTIFIER LCURLY! (aggregate_definition_body_item)* RCURLY! SEMI! ; aggregate_definition_body_item : (access_specifier COLON)* (aggregate_definition_body_item_definition)* ; aggregate_definition_body_item_definition : IDENTIFIER SEMI! //rea   More>>

Hello.

I'm trying to parse c++ like structs but i wasn't not able to avoid nondeterminism warnings trying to implement c++ access specifiers.

what i want to parse (for ex.) is something like this:

interface if1
{
private:
//definitions
public:
private:
} ;

I've got grammar like this

			
aggregate_definition
: KW_INTERFACE
IDENTIFIER
LCURLY! (aggregate_definition_body_item)* RCURLY! SEMI!
;

aggregate_definition_body_item
: (access_specifier COLON)* (aggregate_definition_body_item_definition)*
;

aggregate_definition_body_item_definition
: IDENTIFIER SEMI! //real definitions will be here
;


access_specifier
: KW_PRIVATE
| KW_PUBLIC
;


Thanks for any hints!    <<Less

Re: c++ like structs and nondeterminisms

Posted By:   Igor_GIE  
Posted On:   Thursday, January 13, 2005 01:54 PM

ok, i found an a solution.
About | Sitemap | Contact