llvm/flang/lib/parser/idioms.cc
peter klausler 79d044e9b5 [flang] Take flang-compiler/f18#2 on unparsing, now using the new parse tree walker.
Clean out old data structure formatter.

Create stand-alone Parsing class to compose parts of the parser together.

Hello, world!

Better error recovery on command line errors.

Fix bugs from initial run at f77_correct.

Allow parentheses on PROGRAM statement.

Fix Hollerith scanning.

Remove REDIMENSION with good error recovery.

Fix new "spaces" parser, clean up calls to it.

Fix bugs exposed by in38.f90.

Escaped \a is not special to pgf90; get slashes around STRUCTURE name right.

Better multi-byte source encoding support in Hollerith.

Reformat C++.

More work on multi-byte source encoding.

Pass 219 tests in f77_correct, with good excuses for the rest.

Original-commit: flang-compiler/f18@8a1a0aa2dc
Reviewed-on: https://github.com/flang-compiler/f18/pull/25
Tree-same-pre-rewrite: false
2018-03-13 16:32:09 -07:00

19 lines
384 B
C++

#include "idioms.h"
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
namespace Fortran {
namespace parser {
[[noreturn]] void die(const char *msg, ...) {
va_list ap;
va_start(ap, msg);
std::fputs("\nfatal internal error: ", stderr);
std::vfprintf(stderr, msg, ap);
va_end(ap);
fputc('\n', stderr);
std::abort();
}
} // namespace parser
} // namespace Fortran