X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Farchscript.g;fp=tests%2Farchscript.g;h=0000000000000000000000000000000000000000;hp=5e36d4593e4245677b767bba1cec09a4ef0bacac;hb=3094f58635dc32e4f0ba3922a0ce2f13267ea06e;hpb=5eea0a7ad35fb17a5b7203fa40119ad5cab01ec0 diff --git a/tests/archscript.g b/tests/archscript.g deleted file mode 100644 index 5e36d45..0000000 --- a/tests/archscript.g +++ /dev/null @@ -1,45 +0,0 @@ -// A grammar for assembling archsim networks - -s = !ws (Statement +/ ws) !ws - -Statement = Import | Instance | Settings | Operations - -Settings = "settings" (Setting+/newline) /newline -Setting = Name ^"=" quoted /ws - -Import = ^"import" JavaClassName "as" Type /ws -JavaClassName = Name +/ "." - -Instance = ^"component" !ws ComponentName !ws ":" !ws Type (!newline Connection +/ newline)? - -Connection = Port ^"->" ForeignPort /ws - | Port ^"<-" ForeignPort /ws - -ForeignPort = ComponentName ^"." Port - -Type = Name -Port = Name -ComponentName = Name -Name = string:: [a-zA-Z0-9_]++ - -quoted = "\"" ~[\"]* "\"" -newline = !ws "\n" !ws -ws = [\r\n ]** - | [\r\n ]** !Comment !ws -Comment = "//" ~[\n]* "\n" - | "/*" ~[\n]* "*/" - -Operations = ^"operations" (Operation+/newline) /newline -Operation = ^"build_GASP_model" - | ^"output" quoted /ws - | ^"journal" quoted /ws - | ^"error" quoted /ws - | ^"info" quoted /ws - | ^"run" [0-9]++ /ws - | ^"step" [0-9]++ /ws - | ^"self_check" - | ^"reset" - | ^"print_parameters" - | ^"print_components" - | ^"print_model" - | ^"print_model_description"