Graphic Editor for C Language Using Blockly.

1,101 views
Skip to first unread message

정인호

unread,
Jul 23, 2014, 3:10:03 AM7/23/14
to blo...@googlegroups.com
Hi, we are a team which trying to implement graphical editor for C language using blockly.

Although we are very passionated to this, but as we are all students and has few knowledge and skills for this, accomplishment seems to be very difficult.

If any person who has experience with implementing new language on blockly can give some suggestion or insights, it gonna be a big assistance to us.


Joshua

Marlon Smith

unread,
Jul 23, 2014, 4:04:23 AM7/23/14
to blo...@googlegroups.com
i'd imagine since blockly compiles to javascript code, all you'd have to do is run the javascript output through a library that compiles javascript to c code


--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marlon Smith

unread,
Jul 23, 2014, 4:08:42 AM7/23/14
to blo...@googlegroups.com
well scratch that.. dont think such a library exists :)

Blake

unread,
Jul 24, 2014, 11:43:29 AM7/24/14
to blo...@googlegroups.com
I have been working on building Java Support for Blockly.


In the generators folder you need a new <language>.js and a folder named <language> IE: "c.js" and "c"

Then in the apps folder you can make a new app or modify an existing one.
You'll find that many of the existing apps use soy templates to handle multiple languages. Templates and languages was not something I had the manpower to accomplish, so I followed the template of the block factory as being a simple way to generate code. My first attempt was this dubbed FRCJava. Then I needed more IDE like features, those are here, dubbed Robotbuilder. Id recommend trying not to make changes to the Blockly core files. Instead with JavaScript it is easy to include an override for the method which needs changing. Here is an example of overriding the flyout/toolbox filter method, to allow disabling of blocks which require other blocks before they can be added.

Good Luck!

Do post where you'll be hosting the repository (I'd recommend Github) I would like to see a c version of blockly.

Blake


--

Eric Miller

unread,
Jul 24, 2014, 1:06:12 PM7/24/14
to blo...@googlegroups.com
The team behind Zero Robotics created a Blockly application that generates code in C++. While it isn't perfect for what you need, it could be a good starting point.
https://github.com/zrdev/zrdev.github.io/tree/master/blockly/generators

Ethan DiNinno

unread,
Jul 24, 2014, 10:08:20 PM7/24/14
to blo...@googlegroups.com
FYI, that implementation also includes some fairly heavy modifications
to the core files, some of which are related to C strong typing and
some to fitting Blockly into our specific application. For the more
C-related bits, check the generator folder, blocks/variables.js,
core/variables.js, core/procedures.js, core/blocks.js, and
core/field_variable.js. You can check out the application in
production at zerorobotics.mit.edu.

On Thu, Jul 24, 2014 at 1:06 PM, Eric Miller <superk...@gmail.com> wrote:
> The team behind Zero Robotics created a Blockly application that generates code in C++. While it isn't perfect for what you need, it could be a good starting point.
> https://github.com/zrdev/zrdev.github.io/tree/master/blockly/generators
>

정인호

unread,
Jul 28, 2014, 1:25:05 AM7/28/14
to blo...@googlegroups.com
It would be a good approach, thanks. :)

2014년 7월 23일 수요일 오후 5시 4분 23초 UTC+9, ms 님의 말:

정인호

unread,
Jul 28, 2014, 1:31:58 AM7/28/14
to blo...@googlegroups.com
Thanks for the advice, Blake. :)

I'll try following your procedure to get thing done or not.

May I contact you? If you would like provide more detailed information, it'll be huge help to us.

BTW, we are using GitHub as our SVCS. :)

Joshua

2014년 7월 25일 금요일 오전 12시 43분 29초 UTC+9, Blake Bourque 님의 말:

정인호

unread,
Jul 28, 2014, 1:32:51 AM7/28/14
to blo...@googlegroups.com
Thank for you information. I'll check that. :)

2014년 7월 25일 금요일 오전 2시 6분 12초 UTC+9, Eric Miller 님의 말:

정인호

unread,
Jul 28, 2014, 1:39:30 AM7/28/14
to blo...@googlegroups.com
Thank you! I'll check those files and link. :)

2014년 7월 25일 금요일 오전 11시 8분 20초 UTC+9, Ethan DiNinno 님의 말:
Reply all
Reply to author
Forward
0 new messages