Toy language that output pseudocode, pascal and graphviz dot

Overview

pseudoc

pseudoc is a project I made for school because we needed to write our programs in three different formats: Pascal, pseudocode (similar in structure to pascal) and graphs.

The language is very rudimentary and the compiler full of bugs, some notable features are:

  • Hand made parser
  • Local type inference

There’s a cli which has the following options

pseudoc <input> [<output>]

If no output is specified then pseudocode is printed to stdout, otherwise if the output file has a pas extension pascal is produced, if the extension is dot the dot graphing language is outputted, otherwise pseudocode is emitted.

Example

/* C style comments are supported */
program test; // Optional (taken from the file name if not present)

/* body is our program main block */
body {
  // Variables need to be declared before usage
  // A semicolon must be added to all statements
  let a: int;
  // pseudoc provides two builtin `In` (equivalent of pascal `readln`) and
  // `Out` (equivalent of pascal `writeln`)
  In(a);
  // Types can be omitted and the compiler will try to infer them
  let double = a * 2;
  Out("The result of a*2 is ", double);
}
You might also like...
Safe, efficient, and ergonomic bindings to Wolfram LibraryLink and the Wolfram Language

wolfram-library-link Bindings to the Wolfram LibraryLink interface, making it possible to call Rust code from the Wolfram Language. This library is us

Orion lang is a lispy programming language that is strongly and statically typed.
Orion lang is a lispy programming language that is strongly and statically typed.

Orion Orion is a lisp inspired statically typed programming language written in Rust Install To install orion you can either: Download binary from the

Mote is a systems-programming language designed to be practical, performant, and simple.
Mote is a systems-programming language designed to be practical, performant, and simple.

Mote NOTE: this following lists the goals for what Mote is supposed to be. It does not promise that any of the features here will be accomplished or a

lints and suggestions for the nix programming language

statix Lints and suggestions for the Nix programming language. statix highlights antipatterns in Nix code. statix --fix can fix several such occurrenc

A turing-complete programming language using only zero-width unicode characters, inspired by brainfuck and whitespace.

Zero-Width A turing-complete programming language using only zero-width unicode characters, inspired by brainfuck and whitespace. Currently a (possibl

An implementation of a predicative polymorphic language with bidirectional type inference and algebraic data types

Vinilla Lang Vanilla is a pure functional programming language based on System F, a classic but powerful type system. Merits Simple as it is, Vanilla

A simple programming language for something between C and Rust.

inuc inuc is a systems programming language that is something between C and Rust. Features : [] Strong , static typing (type inference not a priority

🐱 A high-speed JIT programming language and its runtime, meow~

🐱 A high-speed JIT programming language and its runtime, meow~

A statically-typed, interpreted programming language, with generics and type inference

Glide A programming language. Currently, this includes: Static typing Generics, with monomorphization Type inference on function calls func identityT

Owner
João Capucho
João Capucho
📁 A not-so-true-to-life implementation of .env (dot env) for gmod

gmsv_dot_env A not-so-true-to-life implementation of a .env file for gmod. Place a .env at ./garrysmod/.env and any variables set in it will be access

Owain 12 Feb 14, 2023
lelang programming language is a toy language based on LLVM.

lelang leang是一门使用Rust编写,基于LLVM(inkwell llvm safe binding library)实现的编程语言,起初作为课程实验项目,现在为个人长期维护项目。 Target Features 支持8至64位的整形类型和32/64位浮点 基本的函数定义,调用,声明外部

Aya0wind 5 Sep 4, 2022
The orez programming language (a toy langauge for now obviously)

orezc The main repository for the orez programming language (a toy langauge for now obviously) Yes I've looked into the rust compiler, if you are curi

null 12 Mar 11, 2022
A tool to deserialize data from an input encoding, transform it and serialize it back into an output encoding.

dts A simple tool to deserialize data from an input encoding, transform it and serialize it back into an output encoding. Requires rust >= 1.56.0. Ins

null 11 Dec 14, 2022
A fast, iterative, correct approach to Stackblur, resulting in a very smooth and high-quality output, with no edge bleeding

A fast, iterative, correct approach to Stackblur, resulting in a very smooth and high-quality output, with no edge bleeding. This crate implements a t

LoganDark 8 Nov 22, 2022
Grimsby is an Erlang Port written in Rust that can close its standard input while retaining standard output (and error)

Grimsby An Erlang Port provides the basic mechanism for communication from Erlang with the external world. From the Ports and Port Drivers: Erlang Ref

Peter Morgan 5 May 29, 2023
A repository for showcasing my knowledge of the Rust programming language, and continuing to learn the language.

Learning Rust I started learning the Rust programming language before using GitHub, but increased its usage afterwards. I have found it to be a fast a

Sean P. Myrick V19.1.7.2 2 Nov 8, 2022
Nyah is a programming language runtime built for high performance and comes with a scripting language.

?? Nyah ( Unfinished ) Nyah is a programming language runtime built for high performance and comes with a scripting language. ??️ Status Nyah is not c

Stacker 3 Mar 6, 2022
Mewl, program in cats' language; A just-for-fun language

Mewl The programming language of cats' with the taste of lisp ?? What,Why? Well, 2 years ago in 2020, I created a esoteric programming language called

Palash Bauri 14 Oct 23, 2022
The Devils' Programming Language (Quantum Programming Language)

devilslang has roots in Scheme and ML-flavored languages: it's the culmination of everything I expect from a programming language, including the desire to keep everything as minimalistic and concise as possible. At its core, devilslang is lambda-calculus with pattern-matching, structural types, fiber-based concurrency, and syntactic extension.

Devils' Language 2 Aug 26, 2022