Commit Graph

2380 Commits

Author SHA1 Message Date
peter klausler 783d5626fb [flang] Minor refactoring: extract TokenSequence into its own module.
Original-commit: flang-compiler/f18@1b17b4a069
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 5b61beaa12 [flang] Preparatory work for file inclusion.
Original-commit: flang-compiler/f18@1cbbd4a357
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 7e89fc78b0 [flang] Adjust CHECK() so that first token of program can begin with first character.
Original-commit: flang-compiler/f18@2b77e466ff
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 cd7319017a [flang] Fix fixed form scanning, get tests passing again.
Original-commit: flang-compiler/f18@2c8ff18e98
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 97a7c501dc [flang] Forge provenances for compiler-inserted text.
Original-commit: flang-compiler/f18@dbdd01aa25
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 8e585de36b [flang] Fix macro definitions (broken by provenances earlier).
Original-commit: flang-compiler/f18@3ed548b477
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 3bca5d088e [flang] Restructure inter-class references for clarity.
Original-commit: flang-compiler/f18@1836cd5d06
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 f5202dd68f [flang] Fix column tracking in fixed form.
Original-commit: flang-compiler/f18@8c9a1013fa
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 90c3cad9a7 [flang] Debugging new provenance support.
Original-commit: flang-compiler/f18@1233f666da
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 09865ffe7b [flang] Replace Position with Provenance everywhere.
Original-commit: flang-compiler/f18@8c2da3f8cc
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 3558c22101 [flang] Development of character provenance.
Original-commit: flang-compiler/f18@88c5329580
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 ea69370e52 [flang] Begin work on character provenances.
Original-commit: flang-compiler/f18@ea3c05af5a
Reviewed-on: https://github.com/flang-compiler/f18/pull/9
Tree-same-pre-rewrite: false
2018-02-15 15:58:44 -08:00
Tim Keith 4a735b61c6 [flang] Rename methods with uppercase names.
Original-commit: flang-compiler/f18@00fec54e5a
Reviewed-on: https://github.com/flang-compiler/f18/pull/8
2018-02-15 08:27:19 -08:00
Tim Keith e8707d3706 [flang] Add test-type.cc to build types from parse tree.
Original-commit: flang-compiler/f18@47101317fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/8
Tree-same-pre-rewrite: false
2018-02-14 15:29:18 -08:00
Tim Keith cbd894be78 [flang] Continue adding to type.h
New classes: Bound, DeclTypeSpec, ShapeSpec, ComponentArraySpec,
DataComponentDef, ProcDecl, ProcComponentDef, DerivedTypedef

Original-commit: flang-compiler/f18@a09d1e8c81
Reviewed-on: https://github.com/flang-compiler/f18/pull/8
Tree-same-pre-rewrite: false
2018-02-14 15:24:02 -08:00
Tim Keith 6c168650b7 [flang] Add Attrs class to represent set of Attr
Original-commit: flang-compiler/f18@8bb1f0eb9b
Reviewed-on: https://github.com/flang-compiler/f18/pull/8
Tree-same-pre-rewrite: false
2018-02-14 15:07:59 -08:00
Steve Scalpone ac364b1786 [flang] Revert "Schauveau cmake"
Original-commit: flang-compiler/f18@be33dc182a
Reviewed-on: https://github.com/flang-compiler/f18/pull/7
2018-02-14 09:06:47 -08:00
Stephane Chauveau 002fcc72ec [flang] Fix incorrect clang/ directory name in include
Original-commit: flang-compiler/f18@ff61e3228a
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
2018-02-09 10:09:20 +01:00
Stephane Chauveau 6f805b0b7f [flang] Simplified git clone in README
Original-commit: flang-compiler/f18@198d2e6c8a
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false
2018-02-09 10:09:20 +01:00
Stephane Chauveau ad2b8f50a9 [flang] fix bad indentation in README
Original-commit: flang-compiler/f18@60a0123f46
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false
2018-02-09 10:09:20 +01:00
Stephane Chauveau 4fce05cf03 [flang] minor changres
Original-commit: flang-compiler/f18@1d351d2114
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false
2018-02-09 10:09:20 +01:00
Stephane Chauveau 3887bcc1bf [flang] updated build instructions in README.md
Original-commit: flang-compiler/f18@0fea8bd042
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false
2018-02-09 10:09:20 +01:00
Stephane Chauveau a734b9e5bf [flang] add preliminary README file
Original-commit: flang-compiler/f18@1fc60916fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false
2018-02-09 10:09:20 +01:00
Stephane Chauveau ab1dbce5a4 [flang] after clang-format
Original-commit: flang-compiler/f18@7e464a7c33
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false
2018-02-09 10:09:20 +01:00
Stephane Chauveau c27603ec9c [flang] Add new global CMakefile infrastructure with examples
Original-commit: flang-compiler/f18@81b91f3270
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false
2018-02-09 10:09:20 +01:00
Tim Keith c0d92ef566 [flang] Clean up Makefile, add reformat target.
Now the only targets in Makefile are Debug, Release, and reformat.
"make reformat" reformats all C++ source in place.

Also includes the result of "make reformat". Most of the changes were
just moving the "main" include up.

Original-commit: flang-compiler/f18@cf7d3a7afb
2018-02-07 16:27:36 -08:00
Tim Keith e065e5b510 [flang] Move type.{h,cc} and attr.{h,cc}
The are now in new namespace and directory, "semantics", similar to
"parser".

Original-commit: flang-compiler/f18@115a1341e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/5
2018-02-07 15:54:07 -08:00
Tim Keith 4a588883d2 [flang] Adapt to new directory for idioms.cc, idioms.h.
Change idioms.h so that calls to die will work outside the parser
namespace.

Use unordered_map to cache IntConst values.

Original-commit: flang-compiler/f18@9d06c385d9
Reviewed-on: https://github.com/flang-compiler/f18/pull/3
2018-02-07 15:19:54 -08:00
Tim Keith 3bdae798f2 [flang] Address some of the review comments.
Original-commit: flang-compiler/f18@ecdffa3745
Reviewed-on: https://github.com/flang-compiler/f18/pull/3
Tree-same-pre-rewrite: false
2018-02-07 13:57:58 -08:00
Tim Keith 59157ff1a5 [flang] Initial work on the representation of types.
Still work to do for derived types components, array specs, type-bound
procedures, etc.

Added executable type-test to the cmake file which exercises some of the
basic functionality. Modified the Makefile so that "make Debug" does a
cmake build.

Original-commit: flang-compiler/f18@02e8c4c867
Reviewed-on: https://github.com/flang-compiler/f18/pull/3
Tree-same-pre-rewrite: false
2018-02-06 16:46:29 -08:00
peter klausler 14322536e3 [flang] Tweaked .clang-format, then ran it.
Original-commit: flang-compiler/f18@e10e43b691
Reviewed-on: https://github.com/flang-compiler/f18/pull/4
2018-02-07 12:27:36 -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
peter klausler 6e22a3563e [flang] Markdown improvements.
Original-commit: flang-compiler/f18@f40b5e40df
2018-02-06 11:14:53 -08:00
peter klausler 1e69ed0c1b [flang] Convert parser combinator documentation file to Markdown.
Original-commit: flang-compiler/f18@263865c97a
2018-02-05 16:53:38 -08:00
peter klausler 94c26b688e [flang] Alphabetize and remove settings that match LLVM defaults.
Original-commit: flang-compiler/f18@82b1803f76
2018-02-05 16:08:46 -08:00
peter klausler 673626b1c8 [flang] Rename c++style.md -> C++style.md.
Original-commit: flang-compiler/f18@4bde27deae
2018-02-05 15:59:19 -08:00
peter klausler ef0bd23bc6 [flang] More Markdown fixes.
Original-commit: flang-compiler/f18@8e77ed1f0c
2018-02-05 15:58:22 -08:00
peter klausler 2353eb0e92 [flang] More Markdown fixes.
Original-commit: flang-compiler/f18@7097566fa5
2018-02-05 15:53:17 -08:00
peter klausler badb07d4b8 [flang] More Markdown fixes.
Original-commit: flang-compiler/f18@7f7b1deb31
2018-02-05 15:50:42 -08:00
peter klausler ffe393ee9e [flang] More Markdown fixes.
Original-commit: flang-compiler/f18@89bdd4bf07
2018-02-05 15:43:46 -08:00
peter klausler 2bcfa16011 [flang] Fix Markdown usage.
Original-commit: flang-compiler/f18@ee9e67964c
2018-02-05 15:39:52 -08:00
peter klausler 7f9cf6125b [flang] Convert c++style.txt to c++style.md.
Original-commit: flang-compiler/f18@6b846b3c55
2018-02-05 15:28:17 -08:00
peter klausler eed938f5c4 [flang] Fix #else after triggered #elif.
Original-commit: flang-compiler/f18@77db3281ec
2018-02-05 14:45:32 -08:00
peter klausler 16c6f534a5 [flang] Update .clang-format, then reformat all C++ files.
Original-commit: flang-compiler/f18@0ec44de4b7
2018-02-05 14:29:26 -08:00
peter klausler bdea10d9af [flang] Adjust indentation on public:/private: labels in class definitions.
Original-commit: flang-compiler/f18@8c0e5a52a9
2018-02-05 12:54:36 -08:00
peter klausler be830d6b35 [flang] Variadic macros, __VA_ARG__ and __VA_OPT__, and use
"default: CRASH_NO_CASE;" in place of prior macro.

Original-commit: flang-compiler/f18@2108896155
2018-02-05 12:48:09 -08:00
Tim Keith 340a4320b4 [flang] Add .clang-format and "make formatted" rule.
Original-commit: flang-compiler/f18@5ef28a6112
2018-02-05 10:18:38 -08:00
peter klausler ac12232e68 [flang] C++ usage and style guide summary.
Original-commit: flang-compiler/f18@2cf1be7b05
2018-02-05 10:46:32 -08:00
peter klausler 55fe4d2af5 [flang] More preprocessing.
Original-commit: flang-compiler/f18@a553505c3c
2018-02-02 15:52:43 -08:00
peter klausler ad7125ffb0 [flang] Predefined macros (__FILE__, __LINE__, __DATE__, __TIME__).
Original-commit: flang-compiler/f18@8c7f51aa87
2018-02-01 15:01:23 -08:00
peter klausler 809235196a [flang] Merge my local .gitignore with master.
Original-commit: flang-compiler/f18@10134ce283
2018-02-01 12:11:24 -08:00
Tim Keith 198a959bf1 [flang] Remove line that was added by mistake
Original-commit: flang-compiler/f18@629348c130
2018-02-01 07:31:53 -08:00
Tim Keith d45e6c7eda [flang] Add CMakeLists.txt and .gitignore
Original-commit: flang-compiler/f18@d9a1ea4c49
Tree-same-pre-rewrite: false
2018-01-30 16:37:59 -08:00
peter klausler 93cf3aec5e [flang] Support #if/#elif directives with Fortran/C expressions.
Original-commit: flang-compiler/f18@5ea8303954
2018-02-01 12:08:02 -08:00
peter klausler 93db9dd00d [flang] Remove some scaffolding code that I just inadvertently committed, sorry.
Original-commit: flang-compiler/f18@df4dc2ff94
2018-01-30 15:30:56 -08:00
peter klausler 6f94e8472d [flang] Preprocessor work. f18 now passes all my tests except for #if (expression)
and file inclusion.

Original-commit: flang-compiler/f18@07ebac21f5
2018-01-30 15:22:26 -08:00
peter klausler 33d7854c55 [flang] Clean up: convert CharPointerWithLength into a proper class.
Original-commit: flang-compiler/f18@514823234f
2018-01-30 12:21:25 -08:00
peter klausler 880b7939c3 [flang] Add temporary driver main program f2018-demo.cc.
Original-commit: flang-compiler/f18@bbe51ba0ec
2018-01-30 11:55:48 -08:00
peter klausler 55d503fb5a [flang] Add source.{h,cc}.
Original-commit: flang-compiler/f18@39df4a3ef4
2018-01-30 11:55:03 -08:00
peter klausler e78861cba2 [flang] Add prescan.{h,cc}.
Original-commit: flang-compiler/f18@6437ba318c
2018-01-30 11:54:47 -08:00
peter klausler 90cd9bab20 [flang] Add preprocessor.{h,cc}.
Original-commit: flang-compiler/f18@8ac9fc913d
2018-01-30 11:54:31 -08:00
peter klausler 1651445fd3 [flang] Add position.{h,cc}.
Original-commit: flang-compiler/f18@78c9c256ba
2018-01-30 11:54:19 -08:00
peter klausler e76093ca67 [flang] Add parse-tree.{h,cc}.
Original-commit: flang-compiler/f18@bface7a17b
2018-01-30 11:54:04 -08:00
peter klausler 4dd84b6512 [flang] Add message.{h,cc}.
Original-commit: flang-compiler/f18@9c21346414
2018-01-30 11:53:49 -08:00
peter klausler 8fca5084fa [flang] Add idioms.{h,cc}.
Original-commit: flang-compiler/f18@237979b3a8
2018-01-30 11:53:33 -08:00
peter klausler b210228973 [flang] Add Makefile.
Original-commit: flang-compiler/f18@dae1179012
2018-01-30 11:52:26 -08:00
peter klausler 1621078131 [flang] Add user-state.h.
Original-commit: flang-compiler/f18@5daf35b05d
2018-01-30 11:52:12 -08:00
peter klausler 7e293b52c2 [flang] Add parse-state.h.
Original-commit: flang-compiler/f18@357c9f2795
2018-01-30 11:51:59 -08:00
peter klausler 4f342a7899 [flang] Add indirection.h.
Original-commit: flang-compiler/f18@149aa7654c
2018-01-30 11:51:44 -08:00
peter klausler 59cb501b1c [flang] Add grammar.h.
Original-commit: flang-compiler/f18@e5249a0269
2018-01-30 11:51:31 -08:00
peter klausler 77dae1e110 [flang] Add format-specification.h.
Original-commit: flang-compiler/f18@7eea874fa4
2018-01-30 11:51:15 -08:00
peter klausler 74615d7239 [flang] Add debug-parser.h.
Original-commit: flang-compiler/f18@e5484d45b4
2018-01-30 11:50:59 -08:00
peter klausler 5e49363c38 [flang] Add cooked-tokens.h.
Original-commit: flang-compiler/f18@7e452551f7
2018-01-30 11:50:36 -08:00
peter klausler 857165fa86 [flang] Add cooked-chars.h.
Original-commit: flang-compiler/f18@da5c3bf08b
2018-01-30 11:50:21 -08:00
peter klausler d2fe0d263d [flang] Add char-parsers.h.
Original-commit: flang-compiler/f18@0f72c5cb40
2018-01-30 11:50:05 -08:00
peter klausler 76de984a6a [flang] Add basic-parsers.h.
Original-commit: flang-compiler/f18@2cb456daae
2018-01-30 11:49:46 -08:00
peter klausler 15fdae6efe [flang] Add char-buffer.{h,cc}.
Original-commit: flang-compiler/f18@14adb86568
2018-01-30 11:47:17 -08:00
peter klausler e4e52073c2 [flang] Add parser-combinators.txt documentation file.
Original-commit: flang-compiler/f18@c4634a44b9
2018-01-29 15:39:42 -08:00
peter klausler 6ae0a5aca6 [flang] Adding initial files.
Original-commit: flang-compiler/f18@8afd0a6c23
2018-01-29 14:55:57 -08:00
Tim Keith e4344e42cf [flang] Add README
Original-commit: flang-compiler/f18@39876049a9
2018-01-25 13:36:26 -08:00