-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* some support for using Frenetic in the OCaml toplevel (make utop) * better ppx syntax extension: now support [%nk "code"] and [%nk {| code |}] syntax * better ppx tests based on jane streets inline tests (make updatetests will update regression tests) * filter keyword for embedding predicates into policies is now optional
- Loading branch information
Showing
16 changed files
with
253 additions
and
241 deletions.
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 |
---|---|---|
|
@@ -28,6 +28,7 @@ depends: [ | |
"menhir" | ||
"mparser" | ||
"ocamlgraph" {>= "1.8.7"} | ||
"open" | ||
"ppxlib" | ||
"ppx_compare" | ||
"ppx_cstruct" | ||
|
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,23 @@ | ||
(****************************************************************************** | ||
Custom ocamlinit to make experimenting with Frenetic in the OCaml | ||
toplevel/REPL a joy. | ||
|
||
Simply run `make utop`, or, if you prefer doing things by hand, run | ||
``` | ||
{ocaml/utop-full} -init ocamlinit | ||
``` | ||
*******************************************************************************) | ||
|
||
(* load Frenetic, including syntax extension *) | ||
#use "topfind" | ||
#require "frenetic" | ||
#require "frenetic.ppx" | ||
open Frenetic;; | ||
|
||
(* install some pretty printers *) | ||
#install_printer Netkat.Pretty.format_policy | ||
#install_printer Netkat.Pretty.format_pred | ||
let print_auto fmt x = Netkat.Global_compiler.Automaton.render x;; | ||
let print_fdd fmt x = Netkat.Local_compiler.FDD.render x;; | ||
#install_printer print_auto | ||
#install_printer print_fdd |
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 |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
frenetic.async | ||
frenetic.kernel) | ||
) | ||
)) | ||
)) |
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
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
base64 | ||
cstruct | ||
ocamlgraph | ||
open | ||
tcpip | ||
yojson | ||
ipaddr | ||
|
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
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
Oops, something went wrong.