Skip to content

Add FPP (F Prime Prime) language - #8136

Merged
lildude merged 6 commits into
github-linguist:mainfrom
thomas-bc:add-fpp-language
Aug 20, 2026
Merged

Add FPP (F Prime Prime) language#8136
lildude merged 6 commits into
github-linguist:mainfrom
thomas-bc:add-fpp-language

Conversation

@thomas-bc

@thomas-bc thomas-bc commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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.

.fpp is 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 .fppi by 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:

thomas-bc and others added 6 commits August 18, 2026 22:33
- 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>
…nces.fpp

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Swap LinuxUartDriverEvents.fppi sample for Ref topology
@thomas-bc
thomas-bc requested a review from a team as a code owner August 19, 2026 20:25
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*:'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all patterns here are matching on common FPP keywords ... let me know if there are better approaches since we have a grammar...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the Fortran FPP samples are needed - happy to remove

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lildude

lildude commented Aug 20, 2026

Copy link
Copy Markdown
Member

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)

@lildude lildude closed this Aug 20, 2026
@lildude lildude reopened this Aug 20, 2026
@thomas-bc

thomas-bc commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

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.
I am trying to add support for the FPP language in this PR.

Or is there a strict definition of a language that Linguist accepts?

@lildude

lildude commented Aug 20, 2026

Copy link
Copy Markdown
Member

Ok. So "F Prime Prime" is the language and "F Prime" is the framework? 🤯 Feels the wrong way round to me, but 🤷.

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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*:'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is good.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lildude
lildude added this pull request to the merge queue Aug 20, 2026
Merged via the queue into github-linguist:main with commit 830a66d Aug 20, 2026
5 checks passed
@thomas-bc

Copy link
Copy Markdown
Contributor Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants