Last active
April 2, 2020 00:07
-
-
Save eignnx/d12b0e5b0c4e9b00015a82ad557e15f0 to your computer and use it in GitHub Desktop.
Lesson 2 of the `affix-grammar` beginner guide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- # Affix Grammar Tutorial: Lesson 2 | |
-- ### Joining Words Together | |
-- Check out this grammar 👇 | |
rule start = "These" "are" "a" "few" things + "!" | |
rule things = "words" | "sentence elements" | "lexemes" | |
-- When two sentence elements (like `"quoted text"` or `rule_names`) are placed next to each other, they are implicitly joined together and separated by a space (" "). So writing: | |
-- > `"Stop" "thief!"` | |
-- | |
-- is the same as writing: | |
-- > `"Stop thief!"` | |
-- This is usually what you want, but sometimes you'll want two sentence | |
-- elements joined together **without** a space. To do this, put a plus sign (`+`) between the two. Writing: | |
-- > `"Stop thief" + "!"` | |
-- | |
-- is the same as writing: | |
-- > `"Stop thief!"` | |
-- | |
-- Often you'll want to use the plus sign to append punctuation onto the end of a sentence. | |
-- # Next Lesson | |
-- [Click here to go to Lesson 3](https://affix-grammar.netlify.app?gist=96d743c9b493d2225c981e97a06fc4b4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment