Package: scierra
ScierraScierra [see-eh-rah] is aSimulatedC++Interpreter withRecurrentAdaptation.In human words, it's a interactive interpreter for C++, which allows you to run and debug your program immediately as you type. Well, basically. But the implementation is slightly trickier.To get a quick start, simply launch Scierra on the terminal and typecout << "Hello, World!";. Yes, that's a complete C++ program in Scierra!WARNING:Scierra is still under development. Even though many vital aspects of C++ (e.g. function definition, templates, classes) are already supported, Scierra does not handle input statements very well. This is unfortunately keeping Scierra in Beta...NavigationExampleInstallationPrerequisitesInstall with PIPUsageQuick StartKeywordsDocsAnatomy of a C++ Program in ScierraUnsupported featuresLICENSEExampleAn sample program running on the Scierra interpreter:++>cout<<"Hello, World!";Hello,World!++>intfactorial(intn){-->if(n==1||n==0)-->return1;-->elsereturnn*factorial(n-1);-->}++>cout<<"10 factorial is: "<<factorial(10);10factorialis:3628800InstallationPrerequisites:Pythonmust beinstalledandadded to PATH.The key ideas of Scierra and it's CLI have been implemented in Python.GCC(GNU Compiler Collection) must beinstalledandadded to PATH.This allows Python to access G++ through the command line. If you're a Linux user, there's a good chance that GCC tools are already included in your distro. Users of other operating systems like Windows or MacOS may need to make additional installations. MinGW has been tested to work with Scierra on Windows.Install with PIPInstall Scierra with PIP using:$ pip install scierraAfter installation, run Scierra on your terminal using:$ scierraUsageQuick StartLaunchscierrain your terminal, and try pasting in the full sample program below.Note Scierra's ability to automatically categorise whether the block of code you've just typed belongs to themainfunction section, global declarations section, or preprocessors section (refer to theanatomy of a C++ program in Scierra). The<esc>command closes the interpreter.cout<<"Hello, World!\n";#define CYAN "\033[36m"#define GREEN "\033[32m"#define DEFAULT "\033[0m"cout<<GREEN<<"I am SCIERRA"<<DEFAULT<<endl;intfactorial(intn){if(n==1||n==0)return1;elsereturnn*factorial(n-1);}cout<<CYAN<<"10 factorial is: "<<factorial(10)<<DEFAULT<<endl;<esc>Below is a demo of the above program running in a terminal with Scierra:KeywordsType these special keywords at any stage when writing your code to perform special functions.<print>: Prints out the code you've written so far.<restart>: Restarts another interpreter session and forgets all local variables.<esc>: Terminates Scierra.Code keywordsPut the following keywords at the start of each block of your code for special operations.<: Using this keyword before a single-lined statement without any semicolons (e.g.<10+23or<"Hey!") makes Scierra automatically output the evaluated value of the statement. It works with all data types, variables and classes that supportscoutstatements. You can even join multiple outputs together! E.g.++>intx=132;++><x*7924++><x%127<<x%12<<"COOL!"50COOL!++><prep>: Forcefully specifies that the block of code that you type belongs to the 'preprocessor' section of the program. E.g.++><prep>-->constintAnswer_to_Ultimate_Question_of_Life=42;++>This putsconst int Answer_to_Ultimate_Question_of_Life = 42;in the 'preprocessors' section. Without the<prep>keyword, this statement would be automatically placed in themainfunction by Scierra.Refer to:Anatomy of a C++ Program in Scierra.<glob>: Forcefully specifies that the block of code that you type belongs to the 'globals' section of the program.Refer to:Anatomy of a C++ Program in Scierra.<main>: Forcefully specifies that the block of code that you type belongs to themainfunction in the program.Refer to:Anatomy of a C++ Program in Scierra.DocsAnatomy of a C++ Program in ScierraScierra divides a C++ program into three distinct sections: the 'preprocessor' section, the 'globals' section, and the 'main' section. Please refer to thekeywords and expressions tablefor the full list of keywords and expressions that Scierra uses to categorise a block of code. However, here is a quick overview:The 'preprocessor' section comes at the top of the program. This is where libraries are imported and namespaces are defined. By default in Scierra, the librariesiostream,sstream,fstream,vectorandstringare already imported, and the namespacestdis under use. The 'globals' section is reserved for global class and function declarations, while the 'main' section goes into themainfunction of your C++ program.When you enter a block of code in Scierra, it automatically categorises it into one of these three sections based on syntactical keywords and expressions. You can override this automatic behaviour by using one of thecode keywords.Keywords and Expressions TableHere is a table showing the different keywords and expressions that Scierra uses to categorise your block of code.Preprocessor SectionGlobals SectionMain Section#includestatementclasskeywordAnything that doesn't fit into the former two sections#definestatementstructkeywordtypedefkeywordreturnkeywordusingkeywordvoidkeywordtemplatekeywordtypenamekeywordUnsupported featuresScierra supports most features that come with your installed version of GCC.However, unfortunately the following features are not yet supported by Scierra:any expression involving inputslambda expressionsrange-based for loopsLICENSEApache License 2.0