-
Notifications
You must be signed in to change notification settings - Fork 1
/
lang_test.rkt
38 lines (27 loc) · 1.05 KB
/
lang_test.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#lang margrave
// This is a comment
INFO;
LOAD POLICY ./tests/fwex1.p; // this is also a comment
GET RULES IN fwex1;
//explore fWeX1:ACCepT(ipsrc, ipdest, portsrc, portdest, pro ) TUPLING;
explore fWeX1:ACCepT(ipsrc, ipdest, portsrc, portdest, pro ) and ipaddress(ipsrc) and not ipaddress(ipsrc);
shoW one;
count;
shoW AlL;
get all;
//EXPLORE fwex1:accept(<foo:bar>);
// AND binds tighter than IMPLIES, so don't forget the parens:
EXPLORE fwex1:accept(<fwex1:req>) and (ipaddress(ipsrc) implies ipaddress(ipsrc));
show one;
//This is yet another comment
info fwex1;
info last;
//LOAD IOS ./examples/policies/ios-demo/change1/change1.txt
// oh no this comment is in the middle of a statement. i sure hope that
// the lexer ignores them
//WITH "pre" "suf";
// gotta do pre/suf first or else the id will be used
//LOAD IOS ./examples/policies/ios-demo/initial/demo.txt;
//info
// trailing whitespace (and comment, which can't be trimmed!) after the next command, make sure it doesn't clog the parser
//quit; //comment