Skip to content

Commit

Permalink
README: adding links/clarifications for online foi-toy web tool
Browse files Browse the repository at this point in the history
  • Loading branch information
getify committed Dec 30, 2022
1 parent 1dd1481 commit 4df922f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Grammar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Foi Grammar

The **Foi** language grammar in [EBNF form](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form), as [verified here](https://mdkrajnak.github.io/ebnftest/):
The **Foi** language grammar in [EBNF form](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form), as [verified here](https://mdkrajnak.github.io/ebnftest/).

You can also use this grammar to validate code using the [Online Foi-Toy web tool](https://toy.foi-lang.com) or the [Foi-Toy CLI tool](foi-toy/README.md).

```ebnf
(*************** Program / Statements ***************)
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Foi: a different kind of functional programming language

----

[ONLINE FOI PLAYGROUND](https://toy.foi-lang.com)

----

**Foi** is a programming language that pragmatically balances Functional Programming (FP) and imperative programming techniques. It pulls inspiration for various syntax and behaviors from a variety of languages, including: JS, Scala, Haskell, F#, Go, Clojure, Scheme, and others.

```java
Expand Down Expand Up @@ -47,6 +53,7 @@ If you're already convinced and ready to jump in, you may want to check these ou
* [(Mostly Complete) Foi Guide](Foi-Guide.md)
* [Formal Grammar](Grammar.md) (for language theory enthusiasts)
* [Foi-Toy](foi-toy/README.md) (CLI tool)
* [Foi-Toy Online](https://toy.foi-lang.com) (Web tool)

But if you're still skeptical, please read on for more about the [intent](#mission) and [design philosophy](#design-philosophy) of the **Foi** language.

Expand Down Expand Up @@ -244,9 +251,11 @@ For implementers or language design enthusiasts, a [formal grammar specification

**Foi** is still being designed. As such, there's no official compiler/interpreter yet.

However, [Foi-Toy](foi-toy/README.md) is an experimental tool for playing around with **Foi** code, prior to there being an official compiler.
However, [Foi-Toy](foi-toy/README.md) is an experimental tCLI ool for playing around with **Foi** code, prior to there being an official compiler.

Foi-Toy currently supports tokenizing **Foi** code, and syntax highlighting (via HTML/CSS) as shown in the above screenshots. Foi-Toy can also validate code against the formal language grammar.

Foi-Toy currently supports tokenizing **Foi** code, and syntax highlighting (via HTML/CSS) as shown in the above screenshots.
Additionally, there's an [online version of Foi-Toy](https://toy.foi-lang.com) to play around with tokenization, syntax highlighting, and validation.

## License

Expand Down
12 changes: 11 additions & 1 deletion foi-toy/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Foi-Toy

----

[ONLINE FOI-TOY](https://toy.foi-lang.com)

----

This is an experimental tool for toying around with **Foi** code. It is **not** an official implementation of the **Foi** language.

Foi-Toy is available as an [online tool](https://toy.foi-lang.com) or as a [CLI tool](#to-use).

## Features

Main features of Foi-Toy:
Expand Down Expand Up @@ -158,7 +166,9 @@ Tokens/syntax highlighting output are skipped if the validation fails.

## To Use

Save **Foi** code in a file -- generally with a `.foi` filename extension, but you can use whatever you like.
You can [play with Foi-Toy online here](https://toy.foi-lang.com), or use the CLI tool.

To use the CLI tool of Foi-Toy, save **Foi** code in a file -- generally with a `.foi` filename extension, but you can use whatever you like.

Then invoke `node cli.js --file={FILE-PATH}` with a path to the file you want to check. Foi-Toy will default to printing out a list of tokens that were processed from the file.

Expand Down
1 change: 1 addition & 0 deletions foi-toy/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</head>
<body>
<h1>Foi-Toy</h1>
<h2>Online playground for the <a href="http://foi-lang.com">Foi Language</a></h2>

<textarea id="input">
def x: "Hello world!";
Expand Down

0 comments on commit 4df922f

Please sign in to comment.