Syntax
A grammarkdown
grammar file uses significant whitespace in the form of line terminators and indentation. Tab (ASCII 0x9) characters are preferred,
however using multiple spaces for indentation is supported as long as all nested elements have the same amount of leading whitespace.
Productions
A Production consists of a left-hand-side Nonterminal followed by a colon (:
) separator and one or more right-hand-side sentences consisting of
various forms of terminal and nonterminal symbols. For example:
NameSpaceImport : `*` `as` ImportedBinding
It is recommended that Productions should follow pascal-case naming conventions, to avoid collision with reserved keywords.
You may specify multiple productions for a Nonterminal on multiple lines, as follows:
NamedImports : `{` `}`
NamedImports : `{` ImportList `}`
NamedImports : `{` ImportList `,` `}`
You may also specify multiple left-hand-side sentences for a single production by indenting them:
NamedImports :
`{` `}`
`{` ImportList `}`
`{` ImportList `,` `}`
A Production may specify one or more parameters that can be used to reuse a Nonterminal in various circumstances:
IdentifierReference[Yield] :
Identifier
[~Yield] `yield`
A Production may also specify a limited set of terminals, by using the one of
keyphrase:
Keyword :: one of
`break` `do` `in` `typeof`
`case` `else` `instanceof` `var`
`catch` `export` `new` `void`
`class` `extends` `return` `while`
`const` `finally` `super` `with`
`continue` `for` `switch` `yield`
`debugger` `function` `this`
`default` `if` `throw`
`delete` `import` `try`
Parameters
Productions in Grammarkdown can be parametric, allowing you to define syntax that can be conditionally modified by passing arguments. To pass an argument to a Production, you must provide the name of a Parameter in a bracketed argument list. Parameters are both positional and named, so to provide an argument you must supply the name of the argument along with one of the following prefixes:
+
- Indicates the named parameter is set in the referenced production. For example:+In
~
- Indicates the named parameter is unset in the referenced production. For example:~Async
?
- Indicates the current state of the named parameter is used in the referenced production. For example:?Yield
Declaration[Yield] :
HoistableDeclaration[?Yield]
ClassDeclaration[?Yield]
LexicalDeclaration[+In, ?Yield]
Right-Hand-Sides
The right-hand-side of a Production consists of one or more Terminal or Nonterminal symbols, a sentence of Prose, or an Assertion.
Terminals
A Terminal symbol can be one of the following:
- A literal string of one or more characters enclosed in backticks ('`'). For example:
`function`
- A sequence of three backtick characters, which denotes a backtick token. For example:
```
- A unicode character literal enclosed in a leading less-than ('<') character and a trailing greater-than ('>') character. For example:
<TAB>
Nonterminals
A Nonterminal symbol is an identifier, followed by an optional argument list, and an optional question mark ('?'). The question mark changes the cardinality of the Nonterminal from "exactly one" to "zero or one".
The identifier may optionally be enclosed in |
characters, if it happens to collide with a keyword.
Character Literals and Ranges
Character literals may be specified using one of the following forms:
- An abbreviation for a Unicode Code point, of the form
<NBSP>
- A Unicode code point, of the form
U+00A0
Character ranges may be specified using the through
keyword:
SourceCharacter but not one of `"` or `\` or U+0000 through U+001F
Prose
A sentence of Prose is a single line with a leading greater-than ('>') character. For example:
> any Unicode code point
The but not
Condition
The but not
condition allows you to reference a production, excluding some part of that production. For example:
MultiLineNotAsteriskChar ::
SourceCharacter but not `*`
Here, MultiLineNotAsteriskChar may contain any alternative from SourceCharacter, except the terminal `*`
.
The one of
Condition
You can exclude multiple alternatives by including a list of symbols to exclude through the use of the one of
keyphrase.
Each entry in the list is separated by or
:
MultiLineNotForwardSlashOrAsteriskChar ::
SourceCharacter but not one of `/` or `*`
Constraint
A Constraint is a zero-width test at the start of a right-hand-side that indicates that the right-hand-side is only matched
when the specified Parameter is either set (using the +
prefix), or unset (using the ~
prefix). For example:
[~Yield] `yield`
Assertions
An Assertion is a zero-width test that must evaluate successfully for the Production to be considered. Assertions are enclosed in a leading open bracket ('[') character and a trailing close-bracket (']') character.
The possible assertions include:
- The empty assertion, which matches exactly zero tokens:
[empty]
- The lookahead assertion, which verifies the next tokens in the stream:
[lookahead != `function`]
- The no-symbol-here assertion, which verifies the next token is not the provided symbol:
[no LineTerminator here]
- The lexical-goal assertion, which states that the current lexical goal is the supplied Nonterminal:
[lexical goal InputElementRegExp]
- The prose assertion, which allows for arbitrary prose, mixed with terminals and nonterminals:
[> prose text `terminal` prose text |NonTerminal| prose text]
A lookahead assertion has the following operators:
- The
==
operator states the lookahead phrase is matched:[lookahead == `class`]
- The
!=
operator states the lookahead phrase is not matched:[lookahead != `function`]
- The
<-
operator states that any matching phrase in the provided set is matched:[lookahead <- { `public`, `private` }]
- The
<!
operator states that any matching phrase in the provided set is not matched:[lookahead <! { `{`, `function` }]
Linking
During emit, grammarkdown
implicitly adds a generated name for each Production and Right-hand side that can be used to
link directly to the production using a URI fragment. You can explicitly set the name for a production by tagging it with a custom link name:
Declaration[Yield] :
HoistableDeclaration[?Yield] #declaration-hoistable
ClassDeclaration[?Yield] #declaration-class
LexicalDeclaration[In, ?Yield] #declaration-lexical
Comments
You can also annotate your grammar with C-style single-line and multi-line comments.
@
-Directives
Grammarkdown provides several directives for customizing the behavior of the grammar checker from within the grammar file itself:
@import "path"
- Import another grammar.@define <setting> <value>
- Override a limited set of grammar options.setting
can be:noStrictParametricProductions
- Disables strict checking of parameters.noUnusedParameters
- Determines whether to report errors when parameters are unused.
value
can be:true
- Sets the provided setting totrue
.false
- Sets the provided setting tofalse
.default
- Sets the provided setting to the value provided in the grammar options.
@line <number> ["path"]
or@line default
- Changes the grammar checker to report errors using the provided line number and path, or resets line numbering to the current line number in the file.
Examples
For comprehensive examples of grammarkdown
syntax and output, you can review the following samples:
- ECMA-262 version 2020 (ES2020) Grammar
- ECMA-262 version 2015 (ES6) Grammar
- TypeScript 1.5 Supplemental Grammar


MORR Browser Extension options
MORR application port:
Set default port
(You still need to save afterwards to apply the port)
Save


Welcome to the Address Book!
Enter Contact's Name:
Enter Contact's Email:
Enter Contact Phone Number:
Enter Contact's Street Address:
Add Contact!


| DOSE: |
3 hits |
smoked |
5-MeO-DMT |
(powder / crystals) |
I am a big supporter of hallucinogens…been doing since I was about 13 when a buddy gave me six hits of acid and told me to put them on my tongue, but that’s another story. This is an account of 5-MeO-DMT, so I will stay focused.
After reading a lot about 5-MeO-DMT, and I got a hold of a good amount. I was at home with my dad, who happens to be the hippest dad in the world, and we debated who was going to be the first to smoke the strange chemical. We decided because of my intense interest I would be the first of my clan to venture into the other world. We measured out a good dose of about the size of a matchhead, put it on some good herb, and said a few prayers to the gods so that my journey would be safe, and I would find my way back home.
Standing in my kitchen, and inhaling deeply from the pipe I anticipated the effects with some nervousness [Erowid note: Standing while doing 5-MeO-DMT can be quite dangerous as many people lose the ability to stand almost immediately]. I had read a lot about it and I have to admit there was this thing in the back of my head saying “you're crazy”. My adventurer spirit won out though as I took a couple more deep inhalations. At this point I could feel the initial rush coming on so I walked over to the couch and sat down, again, taking another deep inhalation. This is when it all came on with the rushing of “all the rivers in the world”.
My bodily attention seemed to ascend from the bottoms of my feet, up my spine, and up into the top of my head. An incredible pressure built as I felt the top of my skull split in half, and shatter. Attention now was free to roam into the great Mystery. This took place as attention was paradoxically spread out into infinity, at the time it was being pressed into the smallest atomic structure imaginable. During this experience I had lost all sense of myself as a separate entity. The “I” had been utterly smashed into the infinite. My words have no meaning when describing such a feeling. It is beyond the spatio-temporal functions of mind and language.
At some point there came the sense of being inside a gigantic dome structure with an extremely bright purple light suspended high above the infinite field of attention. At this point there was a sense that this place of was an immutable realm prior to our world of experience. There was a strong sense of familiarity as well, like there had been this experience before.
Soon I came back to this world. My hallucinations were incredible! I saw atomic events before my eyes. I had this thought that al atoms have a black hole inside them that somehow destroys and re-creates matter an incredible speed. The plant next to me got real big and strated talking in some “plant language”, and my microwave turned into a large robot and bounced away through the kitchen cabinets.
Inicidently…I think the atoms vibrating has something to do with thalamic pulses occurring at around 400Hz or something…but that’s another story.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{% extends "com/card.html" %} {% block title %}
We've emailed you instructions to change your password. If they haven't arrived in a few minutes, check your spam folder.
{% endblock %} {% block card_action %} Return to login {% endblock %} {% block before_card %}


{% extends 'base.html' %} {% block content %} {{super()}}
If you want an account with us please
if you have an account please