Skip to content

Instantly share code, notes, and snippets.

module OAM-SYNTAX
syntax Ints ::= List{Int,","}
syntax Op ::= "#parallel" Int Int
| "#otherwise" Int Int
| "#pruning" Int Int Int
| "#sequential" Int Int Int
| "#callFun" Int "[" Ints "]"
| "#callDynamic" Int "[" Ints "]"
| "#ffi" Int
| "#coeffect" Int
require "substitution.k"
module LAMBDA
imports SUBSTITUTION
syntax Val ::= Id
| "lambda" Id "." Exp [binder, latex(\lambda{#1}.{#2})]
syntax Exp ::= Val
| Exp Exp [strict, left]
| "(" Exp ")" [bracket]
module EXP-SYNTAX
syntax Exp ::= Int
| "(" Exp ")" [bracket]
| Exp "+" Exp [seqstrict]
| Exp "*" Exp [seqstrict]
| Exp "/" Exp [seqstrict]
| Exp "?" Exp ":" Exp [strict(1)]
| Exp ";" Exp [seqstrict]
syntax Exp ::= "read"
open! Core
let format_error = function
| `NoInput -> "No input to parse"
| `SyntaxError(file, line, col) -> sprintf "Syntax error in namespace %s at line %i column %i" file (line + 1) col
let read_file_or_stdin = function
| None -> In_channel.input_all In_channel.stdin
| Some f -> In_channel.read_all f
open! Core
let format_error = function
| `NoInput -> "No input to parse"
| `SyntaxError(file, line, col) -> sprintf "Syntax error in namespace %s at line %i column %i" file (line + 1) col
let () =
let open Command.Let_syntax in
Command.basic
~summary: "parser, yeeehaa!"
package com.d360.oam
class Inter(val dependencies: Code, val code: Code, val prims: Prims) {
constructor(code: Code, prims: Prims) : this(listOf(), code, prims)
private var instance: Instance = Instance(0, mutableListOf())
private var values = mutableListOf<Value>()
private var coeffects = mutableListOf<Coeffect>()
private var queue = mutableListOf<Token>()
{"key": "хуй пизда телемаркер"}
(ns aleph_test.core
(:require [aleph.http :as http]
[byte-streams :as bs]
[manifold.deferred :as d]
[manifold.stream :as s]
[cheshire.core :as json]
[clojure.core.async :as async]
[clojure.tools.logging :as log]))
(defn query-url
--- a/src/main/antlr/Orc.g4
+++ b/src/main/antlr/Orc.g4
@@ -31,8 +31,8 @@
*/
grammar Orc; // 2.1.0
-@header {
-package com.d360.xorc.antlr;
+@head {
+package orc.compile.antlr;
--- a/src/main/antlr/Orc.g4
+++ b/src/main/antlr/Orc.g4
@@ -31,8 +31,8 @@
*/
grammar Orc; // 2.1.0
-@header {
-package com.d360.xorc.antlr;
+@head {
+package orc.compile.antlr;