Files
Oliver Kellogg 93153c2cd3 https://github.com/AdaCore/PolyORB/pull/1
- 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.
2018-06-18 10:22:09 +02:00
..
2009-05-19 00:10:13 +00:00
2012-01-04 22:41:08 +00:00
2012-01-04 22:41:08 +00:00
2008-08-08 15:25:56 +00:00
2008-05-05 09:04:58 +00:00
2008-05-05 09:04:58 +00:00
2008-08-07 14:51:21 +00:00
2008-05-05 09:04:58 +00:00
2008-05-05 09:04:58 +00:00

1) To run tests:
----------------

Execute ./autotest.sh in the testsuite directory.

Note that autotest.sh expects PolyORB to be installed, and iac and
polyorb-config to be in your PATH variable.

2) To add a new test:
---------------------

 - Create a directory (<test_dir>) and put all the IDL files needed
   for the test in this directory.

 - Add a line in the MANIFEST file corresponding to the test:

   <test_dir>[/<idl_file>]:<test_category>

There are 4 test categories:

 1 - IDL tree tests. In this case the line added to the MANIFEST file
     must be in the form:

     <test_dir>/<idl_file>:idl_frontend

     <idl_file> is the valid IDL file. The test directory must contain
     a file 'test.out' that contains the expected output.

 2 - IDL errors tests: In this case the line added to the MANIFEST
     file must be in the form:

     <test_dir>/<idl_file>:idl_errors

     <idl_file> is the erroneous IDL file. The test directory must
     contain a file 'test.out' that contains the expected error
     message.

 3 - Ada Backend tests: In this case the line added to the MANIFEST
     file must be in one of these 2 forms:

     a - <test_dir>/<idl_file>:ada_backend

     In this case Ada code (stubs, skels and dummy impls) is generated
     from <idl_file> and then compiled.

     b - <test_dir>:ada_backend

     In this case Ada code (stubs, skels and dummy impls) is generated
     from all IDL files in <test_dir> and then compiled.

 4 - Types Backend tests: In this case the line added to the MANIFEST
     file must be in the form:

     <test_dir>/<idl_file>:types_backend

     <idl_file> is the valid IDL file. The test directory must contain
     a file 'test.out' that contains the expected output.