[Chapel Merge] Change mutli-decl and implement noninit production

Branch: refs/heads/main
Revision: 1fbef4b
Author: arezaii
Link: https://github.com/chapel-lang/chapel/pull/19170
Log Message:

Merge pull request #19170 from arezaii/multi-decl-ordering

Change mutli-decl and implement noninit productions

This PR fixes an errant RR production for multi-decls in the new parser
and implements a TODO for assignment to noinit. We also removed the
error message about failing to parse the file into uAST, and added
a reset of decl state after encountering a parse error. To facilitate
debugging, a flag was added to allow only parsing the user module with
the new parser.

Previously, the multi-decl production would create nodes for
type decls in the inverse order that they were declared. This caused
cases like this to fail to compile because the parser would
create newType before myType

type myType = 3*real,
     newType = 3*myType;

After implementing noinit productions, we found it necessary
to reset the decl state after the parser encountered an error.
This was illuminated by test/expressions/nonint/isTypeVar.chpl.
Without the reset, the parser would skip past the parse error and
eventually fail an assertion, masking the site of the syntax error.

Removing the parse failure message is one step towards getting better
alignment between error output between the old and new parser. Future
work will correct erroneous this location is a guess messages that
are appearing even when we have an accurate source location.

TESTING:

  • [x] paratest (0 failures)
  • [x] paratest with --compiler-library-parser
    fewer fails than before (1934 vs. 1969)

Reviewed by @aconsroe-hpe - Thanks!

Signed-off-by: arezaii ahmad.rezaii@hpe.com

Modified Files:
M compiler/next/lib/parsing/bison-chpl-lib.cpp

M compiler/next/lib/parsing/chpl.ypp
M compiler/next/test/parsing/testParseMultiVar.cpp
M compiler/next/test/parsing/testParseVariables.cpp
M compiler/parser/parser.cpp

Compare: https://github.com/chapel-lang/chapel/compare/f346da7e720c...1fbef4bf9160