FGL is a purely functional language that leans on the syntax of mathematics. It uses set-builder notation to construct sets, and graphs are constructed using the formula G = (V,E,src,dst). An FGL file is compiled to GML code, and because of the compiler's component architecture, other formats like DOT can be added with relative ease.
Opening the Compiler.sln file in the folder Compiler will result in all projects being opened. When opened the startup project should be set to Main.
The .flg file which is parsed is specified in the function ParseArgs found in Compiler/src/Main/Program.cs.
The file which is specified here is found in Compiler/src/Main/InputFiles.
It is possible to add new .fgl files here and reference them in ParseArgs.
If the .sln file is open using Visual Studio 2019, two debug profiles will be available, Main and Exception Catched.
Mainruns the compiler with the following arguments: throw and project.Exception Catchedruns the compiler with the following arguments: help, code, project, and output.
helpshows all possible compiler arguments with a short descriptionthrowthe compiler does not handle exceptions (used when debugging the compiler itself)noWritethe output is no longer saved in a .gml fileprojectuses the input and output folders used in the .sln projectparseTreeprints the parse tree to the consolecodeprints the source code to the consoleoutputprints the output to the console
The following folder structure is founder the folder Compiler.
All source code is found in the folder src where each subfolder is a .NET Core 3.1 project. All Testing is found in the folder Tests which is split up into Unit- and Integration Tests.
- src
- ASTLib
- FileGeneratorLib
- FileUtilities
- InterpreterLib
- LexParserLib
- Main
- ReferenceHandlerLib
- TypeCheckerLIb
- Tests
- Unit Testing
- ASTLib.Tests
- FileGeneratorLib.Tests
- FileUtilities.Tests
- InterpreterLib.Tests
- LexParserLib.Tests
- Main.Tests
- ReferenceHandlerLib.Tests
- TypeCheckerLIb.Tests
- IntegrationTesting
- Single Component
- SingleCompIntepreterLib.Tests
- SingleCompReferenceHandlerLib.Tests
- SingleCompTypeCheckerLib.Tests
- Multiple Component
- IntepreterAndGmlGenerator.Tests
- ReferenceHandlerAndTypeChecker.Tests
- TypeCheckerAndIntepreter.Tests
- Single Component
- Unit Testing