www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Problem with the D spec.

reply Paul Bonser <misterpib gmail.com> writes:
This is infinitely recursive...

Declarator2: 	
	BasicType2 Declarator2 	
	( Declarator2 ) 	
	( Declarator2 ) DeclaratorSuffixes

After trying for days to find the problem with my D grammar, I just 
noticed this...no wonder if wouldn't work.

Can anyone tell me what this is supposed to be?
-- 
-PIB

--
"C++ also supports the notion of *friends*: cooperative classes that
are permitted to see each other's private parts." - Grady Booch
Feb 01 2005
parent reply zwang <nehzgnaw gmail.com> writes:
I suppose it should be:
  Declarator2:
      BasicType2 Declarator2
      BasicType2
      ( Declarator2 )
      ( Declarator2 ) DeclaratorSuffixes

Paul Bonser wrote:
 This is infinitely recursive...
 
 Declarator2:    
     BasicType2 Declarator2    
     ( Declarator2 )    
     ( Declarator2 ) DeclaratorSuffixes
 
 After trying for days to find the problem with my D grammar, I just 
 noticed this...no wonder if wouldn't work.
 
 Can anyone tell me what this is supposed to be?

Feb 01 2005
parent Paul Bonser <misterpib gmail.com> writes:
Thanks, that did it...got past that problem.

Now I just have to figure out why it doesn't expect a semicolon at the 
end of an expression....ah well, hopefully this will be done soon and I 
can get to doing something useful with it :)

zwang wrote:
 I suppose it should be:
  Declarator2:
      BasicType2 Declarator2
      BasicType2
      ( Declarator2 )
      ( Declarator2 ) DeclaratorSuffixes
 
 Paul Bonser wrote:
 
 This is infinitely recursive...

 Declarator2:        BasicType2 Declarator2        ( Declarator2 )    
     ( Declarator2 ) DeclaratorSuffixes

 After trying for days to find the problem with my D grammar, I just 
 noticed this...no wonder if wouldn't work.

 Can anyone tell me what this is supposed to be?


-- -PIB -- "C++ also supports the notion of *friends*: cooperative classes that are permitted to see each other's private parts." - Grady Booch
Feb 01 2005