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
module type X = sig | |
type t | |
end | |
module type SS = sig | |
type t | |
end | |
module F (S: SS) : X with type t = S.t = struct | |
include S |
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
type _ grammar = | |
| Either : 'a grammar list -> 'a grammar | |
| CharLiteral : char -> char grammar | |
type state | |
type 'a result = Ok of 'a | Failure of string | |
type 'a parser_code = state code -> 'a result code |
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
type _ cgrammar = | |
| Lit : elem -> elem cgrammar | |
| Seq : 'a cgrammar * 'b cgrammar -> ('a * 'b) cgrammar | |
| Left : 'a cgrammar * 'b cgrammar -> 'a cgrammar | |
| Right : 'a cgrammar * 'b cgrammar -> 'b cgrammar | |
| Either : 'a cgrammar list -> 'a cgrammar | |
| Rep : 'a cgrammar -> ('a list) cgrammar | |
| Repsep : 'a cgrammar * 'b cgrammar -> ('a list) cgrammar | |
| TakeWhile : ('a -> bool) -> ('a list) cgrammar | |
| Trans : ('a -> 'b) * 'a cgrammar -> 'b cgrammar |
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
.< | |
fun state_23 -> | |
let res1_24 = | |
(fun state_13 -> | |
let res1_14 = | |
(fun state_1 -> | |
let ix_2 = state_1.Nparser.Char_parser.index in | |
let f_3 = Nparser.Char_parser.Failure state_1 in | |
if ix_2 < state_1.Nparser.Char_parser.length | |
then |
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
# | |
# Build system for ocs library and interpreter | |
# | |
OCAMLBUILD = ocamlbuild | |
METAOCAMLC = metaocamlc | |
build: | |
$(OCAMLBUILD) -classic-display -ocamlc $(METAOCAMLC) a.byte b.byte |
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
B _build/** | |
S . | |
EXT meta |
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
FastParser { | |
def rule1:Parser[(Char,Char)] = 'a' ~ 'b' | |
def rule2 = ('a' | 'b') ~ 'c' | |
def rule3 = ('a' ~ 'b') | 'c' | |
def rule4 = rule1 ~ (rule2 | rule3) ~ rule1 | |
def rule5 = ('a' | 'b').rep(2,5) | |
} | |
/* --------------------------------------------------------- */ |
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
(* can be compiled with $corebuild functor_autocomplete.native *) | |
open Core_kernel.Std | |
module Key : Map.Key = struct | |
type t = int list with sexp | |
let compare (l1:t) (l2:t) : int = | |
if Set.equal | |
(Set.of_list ~comparator:Int.comparator l1) |
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
`timescale 1ns / 1ps | |
////////////////////////////////////////////////////////////////////////////////// | |
// Company: | |
// Engineer: | |
// | |
// Create Date: 13:16:52 05/19/2015 | |
// Design Name: | |
// Module Name: Square | |
// Project Name: | |
// Target Devices: |
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
module Cars_in_a_row { | |
input wire clk, | |
output [9:0] width, // width, spacing and pos | |
output [9:0] spacing, | |
output [9:0] posy | |
}; | |
reg [9:0] posy_ = 0; | |
reg [9:0] spacing_ = 300; | |
reg [9:0] width_ = 200; |