Commit graph

70 commits

Author SHA1 Message Date
peter klausler
59e3955ea9 [flang] Use "..."_sptok rather than ~ in tokens to denote mandatory spaces.
Original-commit: flang-compiler/f18@1b22874a9d
Reviewed-on: https://github.com/flang-compiler/f18/pull/35
Tree-same-pre-rewrite: false
2018-03-30 11:11:48 -07:00
peter klausler
522d345f12 [flang] Update documentation.
Original-commit: flang-compiler/f18@7045fbcd0c
Reviewed-on: https://github.com/flang-compiler/f18/pull/35
Tree-same-pre-rewrite: false
2018-03-29 16:53:10 -07:00
peter klausler
75b29335ab [flang] Clean out obsolete parsing code. Handle !cdir$ fixed and free in parser.
Work on scanning compiler directive lines.

Fix glitch in earlier change to parse-state.h.

Add ClassifyLine(), simplify some token sequence data lifetimes and interfaces.

Handle continued directives.  Obey !DIR$ FIXED and FREE in prescanner.

Some refactoring of TokenSequence API, then support initial directives (FIXED, FREE, IGNORE_TKR).

Fix !DIR$ IGNORE_TKR syntax, manual was wrong.

Debugging directive scanning & parsing.

Profiling-directed speed-up - do not map cooked source locations to Provenance until a Message is emitted.  Turn some non-nullable pointers into references.

Debugging.

Handle !DIR$ IVDEP too, it is in a test.

Accept directives in the execution part.

Original-commit: flang-compiler/f18@fb2ff367ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/34
Tree-same-pre-rewrite: false
2018-03-28 15:04:36 -07:00
Stephane Chauveau
a7cf13c738 [flang] Provide an emacs style for editing Flang C++ sources
Original-commit: flang-compiler/f18@e9922dda1d
Reviewed-on: https://github.com/flang-compiler/f18/pull/24
Tree-same-pre-rewrite: false
2018-03-26 16:35:34 +02:00
peter klausler
424ec7b35b [flang] Handle empty files gracefully.
Create interval.h.  Use std::size_t instead of bare size_t.  Redefine parser::Name to not be just a bare string.

Break out and rename CharBlock from token-sequence.h for use in the parse tree.

Incremental replacement of name strings with pointers to cooked characters.

Fix case sensitivity problem.

Use new CharBlock encoding to replace strings for real literal constants.

Normalized cooked character stream to lower case.

Simplify parsing now that cooked stream is lower case.  Replace Keyword in parse tree.

Add static_asserts to || and recovery parsers to enforce same result types.

Remove needless TODO comment inserted earlier.

Fix case conversion on prefixed character literals (f90_correct/dc04.f90).

Use CharBlock in user-state.h.

Complete transition from nextChar to nextCh (i.e., always use pointers).

Document extensions.  Begin work on compiler directive lines.

More documentation work.

Reformat prescan.cc.

More work on compiler directive scanning.

Original-commit: flang-compiler/f18@38d0404e16
Reviewed-on: https://github.com/flang-compiler/f18/pull/29
Tree-same-pre-rewrite: false
2018-03-23 13:32:55 -07:00
Steve Scalpone
a857f382ce [flang] Add 'todo' for the predefined scope
Incorporate review feedback; shorten long lines.

Original-commit: flang-compiler/f18@699fb076d7
Reviewed-on: https://github.com/flang-compiler/f18/pull/28
2018-03-22 11:53:59 -07:00
Steve Scalpone
58074411eb [flang] Formatting changes
Original-commit: flang-compiler/f18@ac704fb586
Reviewed-on: https://github.com/flang-compiler/f18/pull/28
Tree-same-pre-rewrite: false
2018-03-21 22:45:43 -07:00
Steve Scalpone
54f101e05d [flang] Update formatting
Extract questions and rationals from the step-wise descriptions.

Original-commit: flang-compiler/f18@38f49e0894
Reviewed-on: https://github.com/flang-compiler/f18/pull/28
Tree-same-pre-rewrite: false
2018-03-21 22:42:05 -07:00
Steve Scalpone
87ecf37155 [flang] Add semantics documentation
Overview of scoping, symbols, and basic semantics.

Original-commit: flang-compiler/f18@b28880a361
Reviewed-on: https://github.com/flang-compiler/f18/pull/28
Tree-same-pre-rewrite: false
2018-03-20 15:47:52 -07:00
peter klausler
393c441767 [flang] Extend documentation.
Original-commit: flang-compiler/f18@f090167356
Reviewed-on: https://github.com/flang-compiler/f18/pull/27
2018-03-20 09:58:45 -07:00
peter klausler
1a4662d6be [flang] Write documentation/preprocessing.md
Original-commit: flang-compiler/f18@4c8f4a97ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/27
Tree-same-pre-rewrite: false
2018-03-19 17:10:53 -07:00
peter klausler
f123105c7a [flang] More typing into documentation/parsing.md
Original-commit: flang-compiler/f18@73f68d0ea1
Reviewed-on: https://github.com/flang-compiler/f18/pull/27
Tree-same-pre-rewrite: false
2018-03-19 15:30:32 -07:00
peter klausler
6e83386c78 [flang] Initial cut at documentation/parsing.md
Original-commit: flang-compiler/f18@5484515b09
Reviewed-on: https://github.com/flang-compiler/f18/pull/27
Tree-same-pre-rewrite: false
2018-03-19 15:17:32 -07:00
peter klausler
42b72c46d1 [flang] Get clean parse-unparse-reparse-unparse on f90_correct too.
Original-commit: flang-compiler/f18@901a9e462c
Reviewed-on: https://github.com/flang-compiler/f18/pull/25
Tree-same-pre-rewrite: false
2018-03-15 10:59:46 -07:00
peter klausler
b28ea527b4 [flang] Address review comments. Add note to style guide condemning if((x=y)).
Original-commit: flang-compiler/f18@4ca8b8e514
Reviewed-on: https://github.com/flang-compiler/f18/pull/25
Tree-same-pre-rewrite: false
2018-03-13 17:20:40 -07:00
peter klausler
1b0705ca0f [flang] Fix parsing error on PROCEDURE statement in derived type definition.
Improve error recovery in that context.

Original-commit: flang-compiler/f18@b9e48504e6
Reviewed-on: https://github.com/flang-compiler/f18/pull/21
2018-03-01 11:28:13 -08:00
peter klausler
601e0acdeb [flang] Improvements suggested by Tim.
Original-commit: flang-compiler/f18@c3d2e3e745
Reviewed-on: https://github.com/flang-compiler/f18/pull/20
Tree-same-pre-rewrite: false
2018-02-28 14:51:45 -08:00
peter klausler
7af9dd8736 [flang] Remove old character "cooking" parser combinators that handled Fortran
comments, continuations, &c. that have become obsolete with the use
of the new C++-coded prescanner module.  Clean out members from
ParseState that were used only by cookedNextChar and its sub-parsers.

Original-commit: flang-compiler/f18@41717531e5
Reviewed-on: https://github.com/flang-compiler/f18/pull/11
Tree-same-pre-rewrite: false
2018-02-16 10:41:16 -08:00
peter klausler
92cbf0e968 [flang] Markdown tweaks in documentation.
Original-commit: flang-compiler/f18@044148ead2
Reviewed-on: https://github.com/flang-compiler/f18/pull/9
Tree-same-pre-rewrite: false
2018-02-15 15:58:44 -08:00
peter klausler
0ba1a14be2 [flang] Impose a directory structure. Move files around. Introduce
an intermediate "parser" namespace.

Original-commit: flang-compiler/f18@690b6f0d1e
Reviewed-on: https://github.com/flang-compiler/f18/pull/4
Tree-same-pre-rewrite: false
2018-02-07 12:04:42 -08:00