Skip to content

Instantly share code, notes, and snippets.

View teliosdev's full-sized avatar
:shipit:

Jeremy Rodi teliosdev

:shipit:
View GitHub Profile
@teliosdev
teliosdev / lexer.rb
Last active August 29, 2015 14:04
Antelope Lexer Example
require "strscan"
class Lexer
def initialize(input)
@input = input
@scanner = StringScanner.new(input)
@line = 1
end
def lex
%grammar.type "ruby"
%require "~> 0.1"
%token IDENT
%token NUM
%token PLUS "+"
%token MINUS "-"
%token DIVIDE "/"
%token MULTIPLY "*"
%token EQUALS "="
{
"configuration": {
"require": [
{ "header": "stdlib.h" },
{ "header": "stdint.h" },
{ "header": "stdio.h" }
]
}
}
@teliosdev
teliosdev / .rubocop.yml
Created March 6, 2017 07:26
My Rubocop File.
AllCops:
TargetRubyVersion: 2.3
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Max: 15
Metrics/BlockLength:
Exclude:
- 'spec/*.rb'
// AffectedArc07's T-comm script
underline = 0; // Prefab Variable
bold = 0; // Prefab Variable
cardcolor = "ffffff"; // Prefab Variable
color = "000000"; // Prefab Variable
def doAsdafagus(theText,from,to) // Defines the function
{
newText = replace(theText, " " + from + "ä", " " + to);
newText = replace(newText, "ä" + from + " ", to + " ");
newText = replace(newText, " " + from + " ", " " + to + " ");