Permalink
Browse files

import ubf-1.10.tgz

  • Loading branch information...
norton committed Apr 11, 2009
1 parent 52f849c commit 580fb80dd6309d073a7f43891165d9e23fb50d1c
Showing with 2,505 additions and 1,500 deletions.
  1. +0 −1 .#irc_plugin.erl
  2. +1 −1 Makefile
  3. BIN client.beam
  4. +12 −12 client.erl
  5. +1 −1 contract.hrl
  6. +1 −0 contract.xrl
  7. +9 −4 contract.yrl
  8. BIN contract_lex.beam
  9. +407 −347 contract_lex.erl
  10. BIN contract_manager.beam
  11. +86 −8 contract_manager.erl
  12. BIN contract_parser.beam
  13. +8 −3 contract_parser.erl
  14. BIN contract_yecc.beam
  15. +367 −326 contract_yecc.erl
  16. BIN contracts.beam
  17. +1 −1 contracts.erl
  18. +1 −0 doc/site/downloads.html
  19. +7 −8 doc/site/eserve.html
  20. +25 −22 doc/site/file.html
  21. +4 −1 doc/site/home.html
  22. +9 −4 doc/site/irc.html
  23. +1 −0 doc/site/javac.html
  24. +1 −0 doc/site/messagebox.html
  25. +65 −35 doc/site/quick.html
  26. +5 −4 doc/site/ubfa.html
  27. +3 −2 doc/site/ubfa_quick.html
  28. +11 −6 doc/site/ubfb.html
  29. +3 −2 doc/site/ubfb_quick.html
  30. +189 −0 doc/site/ubfc.html
  31. +1 −0 doc/site/white.html
  32. +1 −1 doc/src/Makefile
  33. +2 −1 doc/src/Makefile~
  34. +4 −1 doc/src/home.ehtml
  35. +9 −1 doc/src/home.ehtml~
  36. +1 −0 doc/src/menus.inc
  37. +10 −2 doc/src/menus.inc~
  38. +57 −31 doc/src/quick.ehtml
  39. +41 −178 doc/src/quick.ehtml~
  40. +4 −4 doc/src/ubfa.ehtml
  41. +37 −37 doc/src/ubfa.ehtml~
  42. +2 −2 doc/src/ubfa_quick.ehtml
  43. +85 −3 doc/src/ubfa_quick.ehtml~
  44. +2 −2 doc/src/ubfb.ehtml
  45. +64 −111 doc/src/ubfb.ehtml~
  46. +2 −2 doc/src/ubfb_quick.ehtml
  47. +102 −0 doc/src/ubfb_quick.ehtml~
  48. +40 −0 doc/src/ubfc.ehtml
  49. +103 −0 doc/src/ubfc.ehtml~
  50. BIN file_client.beam
  51. +5 −5 file_client.erl
  52. BIN file_plugin.beam
  53. +1 −1 file_plugin.buc
  54. +13 −9 file_plugin.con
  55. +6 −8 file_plugin.erl
  56. BIN find.beam
  57. +5 −3 find.erl
  58. BIN irc_client.beam
  59. +2 −2 irc_client.erl
  60. BIN irc_client_gs.beam
  61. +2 −2 irc_client_gs.erl
  62. +0 −170 irc_client_gs.erl~
  63. BIN irc_plugin.beam
  64. +1 −1 irc_plugin.buc
  65. +8 −4 irc_plugin.con
  66. +2 −2 irc_plugin.erl
  67. BIN leex.beam
  68. +594 −0 nohup.out
  69. +1 −0 notes
  70. BIN plugin_handler.beam
  71. +28 −10 plugin_handler.erl
  72. BIN proc_socket_server.beam
  73. +1 −0 proc_socket_server.erl
  74. BIN server.beam
  75. +0 −1 server.buc
  76. 0 server.con → server.con.old
  77. +6 −38 server.erl
  78. BIN server_plugin.beam
  79. +1 −1 server_plugin.buc
  80. +9 −25 server_plugin.con
  81. +18 −40 server_plugin.erl
  82. BIN test.beam
  83. +12 −10 test.erl
  84. BIN test_plugin.beam
  85. +1 −1 test_plugin.buc
  86. +2 −0 test_plugin.con
  87. +2 −2 test_plugin.erl
  88. BIN ubf.beam
  89. BIN ubf_driver.beam
  90. +1 −1 ubf_driver.erl
  91. BIN ubf_test.beam
  92. BIN ubf_utils.beam
View
View
@@ -16,7 +16,7 @@ ERL = ubf proc_socket_server find server\
PLUGINS = test_plugin file_plugin irc_plugin server_plugin
-CONTRACTS = test_plugin file_plugin irc_plugin server server_plugin
+CONTRACTS = test_plugin file_plugin irc_plugin server_plugin
BEAM = ${ERL:%=%.beam}
BUC = ${CONTRACTS:%=%.buc}
View
Binary file not shown.
View
@@ -6,16 +6,19 @@
%% rpc(Pid, Q) -> Reply
%% stop(Pid) -> ack.
--export([start/2, rpc/2, stop/1, install_default_handler/1,
- info/1, services/1, install_handler/2, startService/3]).
+-export([connect/2, rpc/2, stop/1, install_default_handler/1,
+ info/1, services/1, install_handler/2, start/2]).
-import(ubf_utils, [spawn_link_debug/2]).
-import(lists, [reverse/1]).
+s(X) ->
+ {'#S', X}.
+
debug(F, S) -> true.
%% debug(F, S) -> io:format(F, S).
-start(Host, Port) ->
+connect(Host, Port) ->
Self = self(),
Pid = spawn_link_debug(client,
fun() -> client(Self, Host, Port) end),
@@ -74,8 +77,12 @@ rpc(Pid, Q) ->
end.
info(Pid) -> meta(Pid, info).
+decription(Pid) -> meta(Pid, description).
services(Pid) -> meta(Pid, services).
-
+start(Pid, Service) -> meta(Pid, {start, s(Service)}).
+contract(Pid) -> meta(Pid, contract).
+
+
meta(Pid, Q) ->
Pid ! {self(), {meta, Q}},
receive
@@ -86,13 +93,6 @@ meta(Pid, Q) ->
end.
-startService(Pid, Name, Args) ->
- Pid ! {self(), {startService, Name, Args}},
- receive
- {Pid, Reply} ->
- Reply
- end.
-
install_default_handler(Pid) ->
install_handler(Pid, fun drop_fun/1).
@@ -129,7 +129,7 @@ loop(Driver, Fun) ->
Driver ! {self(), Q},
receive
{Driver, Reply} ->
- From ! {self(), {ok, Reply}}
+ From ! {self(), Reply}
end,
loop(Driver, Fun);
{From, P={startService, Name, Reply}} ->
View
@@ -1,3 +1,3 @@
--record(contract, {name, vsn, info, description,types,transitions}).
+-record(contract, {name, vsn, info, services, description,types,transitions}).
View
@@ -23,6 +23,7 @@ EVENT : {token,{event,YYline}}.
NAME : {token,{name,YYline}}.
INFO : {token,{info,YYline}}.
DESCRIPTION : {token,{description,YYline}}.
+SERVICES : {token,{services,YYline}}.
"[^"]*" : S = lists:sublist(YYtext, 2, length(YYtext) - 2),
{token,{string,YYline,S}}.
=> : {token,{'=>',YYline}}.
View
@@ -1,9 +1,9 @@
Nonterminals
-transitions transition outputs typeAndState
+transitions transition outputs typeAndState strings
form type orType annotatedType primType annotation typeSeq.
Terminals
-info description event vsn atom
+info description event vsn atom services
name integer string typeKwd state
':' '+' '|' '=' '{' '}' '&' ';' ',' '.' '[' ']' '(' ')' '=>' dot.
@@ -16,6 +16,7 @@ form -> '+' typeKwd atom '(' ')' '=' type dot : {type, {unwrap('$3'), '$7'}}.
form -> '+' state atom transitions dot: {transition, {unwrap('$3'), '$4'}}.
form -> '+' info '(' string ')' dot: {info, unwrap('$4')}.
form -> '+' description '(' string ')' dot: {description, unwrap('$4')}.
+form -> '+' services '(' strings ')' dot: {services, '$4'}.
type -> annotatedType orType : eor('$1', '$2').
@@ -25,12 +26,12 @@ orType -> '$empty' : nil.
annotatedType -> atom ':' ':' primType : '$4'.
annotatedType -> primType : '$1'.
-annotation -> atom.
+annotation -> atom : unwrap('$1').
primType -> atom '(' ')' : {prim, unwrap('$1')}.
primType -> '{' typeSeq '}' : {tuple, '$2'}.
primType -> '[' type ']' : {list, '$2'}.
-primType -> atom : {atom, unwrap('$1')}.
+primType -> atom : {constant, unwrap('$1')}.
primType -> integer : {integer, unwrap('$1')}.
primType -> integer '.' '.' integer : {range, unwrap('$1'), unwrap('$4')}.
primType -> string : {string, unwrap('$1')}.
@@ -49,6 +50,10 @@ outputs -> typeAndState : ['$1'].
typeAndState -> type '&' atom: {output, '$1', unwrap('$3')}.
+strings -> string ',' strings : [unwrap('$1')|'$3'].
+strings -> string : [unwrap('$1')].
+strings -> '$empty' : [].
+
Erlang code.
eor(X, nil) -> X;
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 580fb80

Please sign in to comment.