Skip to content

chore(book): add simple calculator example#439

Merged
jeertmans merged 6 commits intomaciejhirsz:masterfrom
your-diary:feature/add_parser_combinator_example
Nov 16, 2024
Merged

chore(book): add simple calculator example#439
jeertmans merged 6 commits intomaciejhirsz:masterfrom
your-diary:feature/add_parser_combinator_example

Conversation

@your-diary
Copy link
Contributor

Related: #436

This PR adds a simple calculator example, which demonstrates how logos crate can be combined with a parser generator library to implement an interpreter for a DSL or a programimng language.

I also added a page to the book.

As I'm not a native English speaker, feel free to edit the language in the book.

Copy link
Collaborator

@jeertmans jeertmans left a comment

Choose a reason for hiding this comment

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

Hello @your-diary, it looks amazing! I don't have much to say, except a few rephrasing suggestions. The English looked very good, but I am myself not a native speaker.

You may note that I pushed a fix to another book page, as I just noticed it when reviewing yours, and I didn't want to create one PR just for that ^^'.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you make those image, or did you take them from somewhere else on the internet?

I think it is important to mention this, and include appropriate licensing information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created the images on my own, using Google Slides.

2024-11-16_20_38_01

I'm ok to contribute the images under the same license as Logos' (MIT and Apache 2.0).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perfect! If you want, please add some header at the top of the page (just after the title) mentioned this work (and images) were contributed by you. If you don't want, then that's ok for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your suggestion!
Added in e084cb2.

@jeertmans jeertmans added the book Related to the book label Nov 16, 2024
@your-diary
Copy link
Contributor Author

@jeertmans
Thank you for the review!

I accepted most of the suggestions and replied to some of your comments.
In addition, I added git clone instruction to the example in 1ba3e07.

@jeertmans
Copy link
Collaborator

Thank you @your-diary!

@jeertmans jeertmans merged commit 727becf into maciejhirsz:master Nov 16, 2024
jeertmans added a commit that referenced this pull request Dec 2, 2024
* chore(book): add simple calculator example

* fix(book): footnote

* Apply suggestions from code review

Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>

* Partially apply a suggestion from code review

* fix(book): add clone instructions to the simple calculator example

* chore(book): add the contributor info to the simple calculator example

---------

Co-authored-by: ynn <contact@your-diary.io>
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
jeertmans added a commit that referenced this pull request Dec 2, 2024
* Minor readme improvments (#442)

* chore: move the release process to its own file

* chore: remove extra whitespace in rust code block

* chore: better with a title :) !

* chore(book): add simple calculator example (#439)

* chore(book): add simple calculator example

* fix(book): footnote

* Apply suggestions from code review

Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>

* Partially apply a suggestion from code review

* fix(book): add clone instructions to the simple calculator example

* chore(book): add the contributor info to the simple calculator example

---------

Co-authored-by: ynn <contact@your-diary.io>
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>

* chore(release): bump version

* chore(release): replace version in docs

* chore(lint): apply Clippy and Rustfmt

* chore(lint): allow needless lifetime

---------

Co-authored-by: tk <tkirishima@proton.me>
Co-authored-by: ynn <58146437+your-diary@users.noreply.github.com>
Co-authored-by: ynn <contact@your-diary.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

book Related to the book

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants