This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 77226 - *Code Model* Parser's grammar in rule cast_expression has long time predicate
Summary: *Code Model* Parser's grammar in rule cast_expression has long time predicate
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-01 14:26 UTC by Vladimir Voskresensky
Modified: 2009-05-14 16:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2006-06-01 14:26:12 UTC
The grammar for cast_expression has following problematic alternative:
(cast_expression_type_specifier cast_expression)=>
cast_expression_type_specifier cast_expression

This cause to very exponential "guessing" phase after which we pass to next
level recursion for next cast_expression. This cause next level of recursion for
each arithmetic operation after (...)
Comment 1 Vladimir Voskresensky 2006-06-01 14:42:53 UTC
Trying to split cast_expression's into some quick predicted alternatives.
The main problem is in understanding the meaning of constructions like (A). This
could be cast or expression.
for example int a = (U8)*b; could be casting to U8 or multiplying U8 and b.
In our case we can't use symtab for complete solution, because parser should
work on incomplete code and type U8 or variable U8 could be introduced only
after writing expression int a = (U8)*b;
But we have some cases, where it's clear casting vs. expression.
i.e.
(U8*) is cast
(const A&) is cast
(U8)ID is cast
(U8)% and (U8); are expressions
and so on
Comment 2 Vladimir Voskresensky 2006-06-01 16:56:52 UTC
after fixing 77228 this is no more critical problem, so I remove blocking of
IZ#76898 and decrease this to P4
Comment 3 nnnnnk 2009-02-03 16:06:18 UTC
After switching to lazy_expression there is no such rules in grammar.
Comment 4 Vladimir Voskresensky 2009-05-14 16:07:25 UTC
resolved in 6.7