Browse files

merging.....

  • Loading branch information...
2 parents ab0fae0 + 52cb16b commit 16b270ce826c1a7481a70107ec3f1fded11668f4 @jucimarjr committed Jun 28, 2012
Showing with 28 additions and 54 deletions.
  1. +24 −0 area.erl
  2. +2 −1 raw/area.raw.erl
  3. +0 −49 raw/area2.raw.erl
  4. +2 −2 src/core.erl
  5. +0 −1 src/ooe.erl
  6. +0 −1 src/uarini_parser.yrl
View
24 area.erl
@@ -0,0 +1,24 @@
+-module(area).
+-export([new/1, area/1]).
+class_attributes()->
+ ooe:det_attribute({a, R},nil),
+ ooe:det_attribute({a, J},2.34000000000000013545e-01),
+ ooe:det_attribute({a, S},"teste"),
+ ooe:det_attribute({a, K},4),
+ ooe:det_attribute({a, Z},nil).
+class_init() ->
+class_attributes().
+new([]) ->
+class_init(),
+spawn fun thread().
+thread() ->
+receive {From, {area, [Dados]}} -> From ! area(Dados),
+B="oi",
+thread() ; {From, {print, []}} -> From ! print(),
+thread() ; {From, Other} -> From ! {self(), {error, Other}},
+thread() end.
+area(Dados) ->
+ok.
+print() ->
+ok.
+
View
3 raw/area.raw.erl
@@ -13,7 +13,8 @@ class_attributes()->
% gerado automaticamente para inicializar o objeto
class_init()->
- class_attributes().
+ class_attributes(),
+ class_methods().
%% ----------------------------------------------------------------------------
%% create by ooe - end
View
49 raw/area2.raw.erl
@@ -1,49 +0,0 @@
--module(area).
--export([new/1, area/1]).
-
-%% ----------------------------------------------------------------------------
-%% create by ooe - begin
-%% ----------------------------------------------------------------------------
-class_attributes()->
- put({a,R},nil),
- put({a,J}, 0.234),
- put({a,S},"teste"),
- put({a,K}, 4),
- put({a,Z},nil).
-
-% gerado automaticamente para inicializar o objeto
-class_init()->
- class_attributes().
-
-%% ----------------------------------------------------------------------------
-%% create by ooe - end
-%% ----------------------------------------------------------------------------
-
-
-%% para ser classe , deveria ter o new e o thread
-%% seriam obrigatorias, mas seriam criadas pelo programador
-new([]) ->
- class_init(), %% colocado como 1a linha do new
- spawn fun thread().
-
-thread() ->
- receive
- { From, { area, [Dados] } } ->
- From ! area(Dados),
- thread();
-
- { From, { print, [] } } ->
- From ! print(),
- thread();
-
- { From, Other } ->
- From ! { self(), { error, Other } },
- thread()
- end.
-
-%% funcoes criadas pelo programador daqui para baixo
-area(Dados)->
- ok.
-
-print() ->
- A = self::R.
View
4 src/core.erl
@@ -66,15 +66,15 @@ transform_export_rest([]) ->
%%------------------------------------------------------------------------------
%% Transforma lista de atributos
transform_attribute_list([{match, Name, Value}| Rest]) ->
- "class_attributes()-> \n put({a, " ++
+ "class_attributes()-> \n ooe:det_attribute({a, " ++
atom_to_list(Name) ++ "}," ++
resolve_param(Value) ++
")" ++
transform_attribute_rest(Rest).
transform_attribute_rest([{match, Name, Value} | Rest]) ->
- ",\n put({a, " ++
+ ",\n ooe:det_attribute({a, " ++
atom_to_list(Name) ++ "}," ++
resolve_param(Value) ++
")" ++
View
1 src/ooe.erl
@@ -20,4 +20,3 @@ def_attribute({Class,[Attributes]})->
def_methods({Class,[Methods]})->
put({Class,methods},[Methods]),
ok.
-
View
1 src/uarini_parser.yrl
@@ -197,7 +197,6 @@ method_statement -> oo_get_statement : '$1'.
erlang_statement -> terminal : ['$1'].
erlang_statement -> terminal erlang_statement : ['$1' | '$2'].
-terminal -> ',' : unwrap('$1').
terminal -> ';' : unwrap('$1').
terminal -> '->' : unwrap('$1').
terminal -> '!' : unwrap('$1').

0 comments on commit 16b270c

Please sign in to comment.