Add FPP (F Prime Prime) language - #8136
Conversation
- FPP language entry with .fpp and .fppi extensions - Grammar from fprime-community/fpp-tools (source.fpp, Apache-2.0) - Heuristic to disambiguate .fpp between FPP and Fortran - Real-world FPP samples from nasa/fprime and Fortran .fpp samples from MFlowCode/MFC Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Add FPP language support
…nces.fpp Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Swap LinuxUartDriverEvents.fppi sample for Ref topology
| pattern: | ||
| - '^\s*(active|passive|queued)\s+component\s' | ||
| - '^\s*(module|topology|struct|enum|port|interface)\s+[A-Za-z_$][A-Za-z0-9_]*\s*\{' | ||
| - '^\s*instance\s+[A-Za-z_$][A-Za-z0-9_]*\s*:' |
There was a problem hiding this comment.
all patterns here are matching on common FPP keywords ... let me know if there are better approaches since we have a grammar...
There was a problem hiding this comment.
Not sure the Fortran FPP samples are needed - happy to remove
There was a problem hiding this comment.
Thanks for these. We don't currently have .fpp samples for Fortran as it was added in the very early days of Linguist before we started collecting samples. It's also needed for your heuristic test.
|
This is a framework and not an actual language… you've stated it. We don't add support for frameworks, hence there's no React or Ruby on Rails language in Linguist. We can certainly add a specific language (F Prime?) for files incorrectly identified or add their extensions to the languages they're actually written in. (Whoops, didn't mean to close) |
|
Apologies if my PR description was confusing. F Prime is a framework, but FPP is a language, with its own compiler, formal language specification, language server, and more. It's not built on top of another language like Ruby on Rails or React. Or is there a strict definition of a language that Linguist accepts? |
|
Ok. So "F Prime Prime" is the language and "F Prime" is the framework? 🤯 Feels the wrong way round to me, but 🤷. |
lildude
left a comment
There was a problem hiding this comment.
Looks good. Your timing is perfect too as I'm about to make a new release so it won't be long before this lands on GitHub.
| pattern: | ||
| - '^\s*(active|passive|queued)\s+component\s' | ||
| - '^\s*(module|topology|struct|enum|port|interface)\s+[A-Za-z_$][A-Za-z0-9_]*\s*\{' | ||
| - '^\s*instance\s+[A-Za-z_$][A-Za-z0-9_]*\s*:' |
There was a problem hiding this comment.
Thanks for these. We don't currently have .fpp samples for Fortran as it was added in the very early days of Linguist before we started collecting samples. It's also needed for your heuristic test.
|
Thanks a lot! |
Adds support for FPP (short for "F Prime Prime"), the domain specific modeling language of NASA's F Prime flight software framework. More info at https://github.com/nasa/fprime and https://fprime.jpl.nasa.gov
Description
FPP is the DSL used to model software components in F´, from which C++ is autocoded for flight software applications. It is used across NASA flight projects and the F´ open-source community, with users from academia (university cubesat teams, research) and industry.
.fppis currently recognized as Fortran, so this PR adds a heuristic on specific FPP keywords. Let me know if you have better patterns for this and I'm happy to iterate (disclaimer: I've used AI to help me craft this changeset, but I (human) will happily iterate manually with yall)FPP also uses
.fppiby convention to note files that are to be included in other files, so I have added it as well.Thank you from the F Prime team!
Checklist:
portwhich seems to yield no Fortran results).fppifiles).fppsamples conflicting with FPP samples:source.fpp)#d37327#4d41b1.