Giter Club home page Giter Club logo

flpr's People

Contributors

pjh40 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flpr's Issues

Add new syntax node for type decls

The grammar for type-declaration-stmt is (R801):

declaration-type-spec [ [ , attr-spec] ... :: ] entity-decl-list

which is fine, except that that is no easy way to identify the token range that one would use to make a new variable of this type. I'm going to introduce a new non-terminal:

type-decl-attr-seq is declaration-type-spec [ [ , attr-spec ] ... :: ]

to allow an easier time picking apart the statement. This will cause a change from R801:

type-declaration-stmt is type-decl-attr-seq entity-decl-list

Fix call-stmt Stmt_Tree

The Stmt_Tree for CALL foo(a) is coming out as:

call-stmt <CALL procedure-designator <data-ref <part-ref <name ( section-subscript-list <section-subscript <int-expr <expr > > > ) > > > >

which is incorrectly marking the substring (a) as a data-ref rather than an actual-arg-spec-list.

Move indentation capability to Parsed_File

The ability to reindent a file is currently held in apps/flpr_format_base.cc, but it is generally useful capability to repair generated files. Move this capability to flpr/Parsed_File.hh, because that holds all the information required to do reindentation.

Implement flpr-format elaborate end statement

flpr-format has a stub implementation for a feature to elaborate external subprogram end statements into its full form (e.g. END FUNCTION function-name). This needs to be fleshed out.

Improve apps/module.cc

  1. move to module_base structure, similar to flpr_format_base.
  2. integrate local changes to make the demo a bit more useable.

Issue not finding BuildType.cmake when building via CMake's FetchContent

I'm building a standalone application that depends on FLPR and I am using CMake for my build system. Recent-ish versions of CMake allow for downloading and building remote dependencies with the ExternalProject and FetchContent facilities. FetchContent is especially nice for including dependencies that also use CMake. So, for example, my application's CMakeFiles.txt contains:

include(FetchContent)
set(FLPR_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/FLPR-source")
FetchContent_Declare(FLPR
  GIT_REPOSITORY https://github.com/lanl/FLPR.git
  GIT_TAG        HEAD
  SOURCE_DIR     "${FLPR_SOURCE_DIR}"
)
FetchContent_MakeAvailable(FLPR)

which will retrieve the FLPR source from GitHub and place it in build/FLPR-source, then perform some CMake magic to build it. So far, so good: you should see this pull and attempt to build FLPR with CMake.

The issue seems to be one of CMake module detection and pathing; the build fails with:

CMake Error at build/FLPR-source/CMakeLists.txt:18 (include):
  include could not find load file:

    BuildType


CMake Error at build/FLPR-source/CMakeLists.txt:19 (include):
  include could not find load file:

    CompilerFlags

Both BuildType.cmake and CompilerFlags.cmake exist under build/FLPR-source/cmake with appropriate permissions (as expected) but it seems like CMake is searching for them under <my project root>/cmake instead (where it should look for these files when it's normally built as a standalone project). That is, the errors disappear if I copy BuildType.cmake and CompilerFlags.cmake to <my project root>/cmake.

I believe the critical lines of FLPR's CMakeLists.txt are

# Allow CMake to find some project include files
list (INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")

but I don't have a good idea of how to appropriately set CMAKE_MODULE_PATH in a submodule; what's needed is the child's version of "${CMAKE_SOURCE_DIR}/cmake", not the parent's.

I'm not sure if this configuration mismatch is on my side or not; I'm still digging into it.

parse_files chokes on legacy idiom: do-loop terminating label assigned to non-continue line

I was torture-testing parse_files on some old EISPACK code and I ran across an idiom that causes indigestion:

       do 100 i = mp1, igh
100    z(i,mp) = a(i,mp-1)

It appears that having the do-terminating line label assigned to something other than continue causes an unrecognized statement error. Moving 100 to a continue statement solves this problem. I also tested adding more lines between do and the terminating 100 but that had no effect.

This is bad style in modern code but it's unfortunately common in legacy code; not surprising that it tripped up the parser (hence the torture testing...)

Fix label formatting

Under flpr-format -fi, labels are not being formatted the same as in emacs: they should be left-justified

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.