Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06f7007
commit f0bac8c
Showing
4 changed files
with
122 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<lexer> | ||
<config> | ||
<name>VHS</name> | ||
<alias>vhs</alias> | ||
<alias>tape</alias> | ||
<alias>cassette</alias> | ||
<filename>*.tape</filename> | ||
</config> | ||
<rules> | ||
<state name="root"> | ||
<rule pattern="(Output)(\s+)(.*)(\s+)"> | ||
<bygroups> | ||
<token type="Keyword"/> | ||
<token type="TextWhitespace"/> | ||
<token type="LiteralString"/> | ||
<token type="TextWhitespace"/> | ||
</bygroups> | ||
</rule> | ||
<rule pattern="\b(Set|Type|Left|Right|Up|Down|Backspace|Enter|Tab|Space|Ctrl|Sleep|Hide|Show|Escape)\b"> | ||
<token type="Keyword"/> | ||
</rule> | ||
<rule pattern="\b(FontFamily|FontSize|Framerate|Height|Width|Theme|Padding|TypingSpeed|PlaybackSpeed|LineHeight|Framerate|LetterSpacing)\b"> | ||
<token type="NameBuiltin"/> | ||
</rule> | ||
<rule pattern="#.*(\S|$)"> | ||
<token type="Comment"/> | ||
</rule> | ||
<rule pattern="(?s)".*""> | ||
<token type="LiteralStringDouble"/> | ||
</rule> | ||
<rule pattern="(?s)'.*'"> | ||
<token type="LiteralStringSingle"/> | ||
</rule> | ||
<rule pattern="(@|\+)"> | ||
<token type="Punctuation"/> | ||
</rule> | ||
<rule pattern="\d+"> | ||
<token type="LiteralNumber"/> | ||
</rule> | ||
<rule pattern="\s+"> | ||
<token type="TextWhitespace"/> | ||
</rule> | ||
<rule pattern="(ms|s)"> | ||
<token type="Text"/> | ||
</rule> | ||
</state> | ||
</rules> | ||
</lexer> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Where should we write the GIF? | ||
Output demo.gif | ||
|
||
# Set up a 1200x600 terminal with 46px font. | ||
Set FontSize 46 | ||
Set Width 1200 | ||
Set Height 600 | ||
|
||
# Type a command in the terminal. | ||
Type@100ms "echo 'Welcome to VHS!'" | ||
|
||
# Pause for dramatic effect... | ||
Sleep 500ms | ||
|
||
# Run the command by pressing enter. | ||
Enter | ||
|
||
# Admire the output for a bit. | ||
Sleep 5s |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[ | ||
{"type":"Comment","value":"# Where should we write the GIF?"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Output"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"LiteralString","value":"demo.gif"}, | ||
{"type":"TextWhitespace","value":"\n\n"}, | ||
{"type":"Comment","value":"# Set up a 1200x600 terminal with 46px font."}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Set"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"FontSize"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"LiteralNumber","value":"46"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Set"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"Width"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"LiteralNumber","value":"1200"}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Set"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"NameBuiltin","value":"Height"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"LiteralNumber","value":"600"}, | ||
{"type":"TextWhitespace","value":"\n\n"}, | ||
{"type":"Comment","value":"# Type a command in the terminal."}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Type"}, | ||
{"type":"Punctuation", "value": "@"}, | ||
{"type":"LiteralNumber", "value": "100"}, | ||
{"type":"Text", "value": "ms"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"LiteralStringDouble","value":"\"echo 'Welcome to VHS!'\""}, | ||
{"type":"TextWhitespace","value":"\n\n"}, | ||
{"type":"Comment","value":"# Pause for dramatic effect..."}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Sleep"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"LiteralNumber","value":"500"}, | ||
{"type":"Text","value":"ms"}, | ||
{"type":"TextWhitespace","value":"\n\n"}, | ||
{"type":"Comment","value":"# Run the command by pressing enter."}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Enter"}, | ||
{"type":"TextWhitespace","value":"\n\n"}, | ||
{"type":"Comment","value":"# Admire the output for a bit."}, | ||
{"type":"TextWhitespace","value":"\n"}, | ||
{"type":"Keyword","value":"Sleep"}, | ||
{"type":"TextWhitespace","value":" "}, | ||
{"type":"LiteralNumber","value":"5"}, | ||
{"type":"Text","value":"s"} | ||
] |