Also kill redundant check for generated code from IDL.
This fixes compilation due to:
warning: unnecessary with of ancestor [-gnatwr]
Change-Id: Iec9f29cdcc033afb4ba3d6f32d8aff7aacec6cfd
This makes the test for introductory markers present in the preprocessed
output more robust.
[changelog]
* compilers/iac/lexer.adb (Scan_Preprocessor_Directive): Skip all
markers starting with line #0 in addition to special file names.
TN: U531-008
Change-Id: If5ee372bb662addf1b28054634604696e21ac7c5
- Move handling of annotation applications from lexer to parser:
compilers/iac/lexer.adb
- In procedure Scan_Token (Fatal : Boolean) case-statement decoding
Buffer (Token_Location.Scan), reduce handling of '@' to just assign
T_At to Token, i.e. do not advance the scan location over the
annotation application.
compilers/iac/parser.adb
- New procedure Skip_Annapp_Scan_Token (T : Token_Type := T_Error) is
similar to Scan_Token but skips any annotation applications that may
exist at the scanner's current location.
The optional parameter T is the expected token type.
If left at its default (T_Error), no specific token type is expected.
- New procedure Skip_Annapp_Scan_Token (State : in out Location) is
similar to the above but updates the given scanner state on skipping
annotation applications.
- New function Skip_Annapp_Next_Token return Token_Type is similar to
Next_Token but skip any annotation applications that may exist at the
scanner's current location, advancing the scan location while this is
the case.
- In function P_Attribute_Declaration replace initial Scan_Token call
by Skip_Annapp_Scan_Token.
- In function P_Constant_Expression fix comment in loop `while not
Is_Expression_Completed'.
- In function P_Definition replace initial Scan_Token call by
Skip_Annapp_Scan_Token (State).
- In function P_Identifier replace call to Scan_Token (T_Identifier) by
Skip_Annapp_Scan_Token (T_Identifier).
- In function P_Operation_Declaration replace initial calls to
Scan_Token by calls to Skip_Annapp_Scan_Token (State).
- In function P_Simple_Type_Spec replace initial Next_Token call by
Skip_Annapp_Next_Token.
- In function P_State_Member replace initial Scan_Token call by
Skip_Annapp_Scan_Token (State).
testsuite/idls/annapp01/tin.idl
testsuite/idls/annapp01/test.out
testsuite/idls/MANIFEST
- Start testing annotation applications.
Address review comment at https://github.com/AdaCore/PolyORB/pull/1,
> [...] the part between parentheses in an annotation application is a
> <const_expr>, which may itself contain nested parentheses.
compilers/iac/lexer.adb
- In procedure Scan_Token (Fatal : Boolean) case-statement decoding
Buffer (Token_Location.Scan), at handling of '@' followed by '(',
new counter `Parentheses' keeps track of opening/closing parentheses
to account for embedded parentheses in the loop which skips to the
ending ')' of the annotation application.
compilers/iac/lexer.ads
- In Token_Type add T_At.
compilers/iac/lexer.adb
- In procedure Process, in then-part of `if not Initialized' add call
New_Token (T_At, "@");
- In procedure Scan_Token (Fatal : Boolean) case-statement decoding
Buffer (Token_Location.Scan) add handling of '@':
- If the following token is an identifier then skip the identifier
and whitespace that may follow it; if the following token is '('
then seek ')' and increment Token_Location.Scan to the index after
the ')'. Do not modify the value of Token.
- Otherwise set Token to T_At.
by a customer. This is a convenience for those also using idlj
(idl-to-java), because idlj recognizes that pragma.
Fixes Q621-023
Subversion-branch: /trunk/polyorb
Subversion-revision: 257245
These redundant clauses will be flagged by the compiler in the near
future (PA07-083).
Q725-034
Subversion-branch: /trunk/polyorb
Subversion-revision: 257110
For an interface, we generate two typecode objects: one in
the enclosing scope, and one in the interface's own scope.
When initializing the object in the enclosing scope, do not
erroneously reference that in the interface scope.
Fixes P921-037
Subversion-branch: /trunk/polyorb
Subversion-revision: 251246
inserted in the homonyms chain in the order they were declared
so that later reopening of modules correctly override earlier
ones.
Further fix for N909-046
Subversion-branch: /trunk/polyorb
Subversion-revision: 232591
1
from it to compensate for incrementation by Skip_Line.
Fixes regression introduced by change for N723-007
Subversion-branch: /trunk/polyorb
Subversion-revision: 232397
reopening a module so that they are correctly visible further on.
In backends, ignore instances of a module that has been reopened further
on, to prevent duplicate processing.
Fix for N909-046
Subversion-branch: /trunk/polyorb
Subversion-revision: 232364