デジタルちんぶろぐ

デジタルな話題

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  268  : 記事  0  : コメント  4419  : トラックバック  79

ニュース


技術以外は
ちんぶろぐ

記事カテゴリ

書庫

日記カテゴリ

Hello Worldはサイトに載っているので自分で何とか書いてみた。

英文を通すのに一苦労w

 

test.spl

The test program of Shakespeare.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.

    Act I: Romeo and Juliet.
    Scene I: Romeo asks to Juliet her mind.

[Enter Romeo and Juliet]

Romeo:
Open your mind!
Speak your mind!

Juliet:
You are as good as the sum of a big tree and a beautiful flower.
Open your heart!

[Exeunt]

 

cygwin上で作成したspl2cを使って以下のようにsplをCへ

spl2c < test.spl > test.c

出力されたCのソースがこちら

test.c

/********************************************************************
*    This C program was generated by spl2c, the Shakespeare to C    *
*          converter by Jon ナslund and Karl Hasselstr.            *
********************************************************************/

/* libspl definitions and function prototypes */
#include

int main(void)
{
  /******************************************************************
   * THE TEST PROGRAM OF SHAKESPEARE                                *
   ******************************************************************/

  CHARACTER *romeo;                       /* a young man with a remarkable patience */
  CHARACTER *juliet;                      /* a likewise young woman of remarkable grace */

  int comp1, comp2;

  global_initialize();

  romeo = initialize_character("Romeo");
  juliet = initialize_character("Juliet");

  act_i:                                  /* Romeo and Juliet */

  act_i_scene_i:                          /* Romeo asks to Juliet her mind */

  enter_scene(9, romeo);
  enter_scene(9, juliet);

  activate_character(15, romeo);
  char_input(12, second_person);
  char_output(13, second_person);

  activate_character(19, juliet);
  assign(16, second_person, int_add(16, 2*1, 2*1));
  int_output(17, second_person);

  exit_scene_all(19);

  return 0;
}

慢性的な人材不足と開発効率の上がらない組み込み業界のブレイクスルーとなるか!と期待をしていたのですが、この出力結果を見ると、どうやら組み込み用途で使用するのは困難なようです。

投稿日時 : 2008年10月30日 1:23

コメント

# re: Shakespeareの吐くCのコード 2008/10/30 10:22 ゆーち
ライブラリが付属してるわけですね。
どーしてこうなるのか、ってのわかりません。
あまり深追いしようとも思えないです。(´・ω・`)

>どうやら組み込み用途で使用するのは困難なようです。
チャレンジしてるところがすごい。
と思いましたw

# re: Shakespeareの吐くCのコード 2008/10/30 22:57 あんどちん
> あまり深追いしようとも思えないです。(´・ω・`)
そのつもりだったんですけどね…Cのソースは見てみたかったので。
spl2cのソースコードも付いてましたがそっちには手を出しませんw

> チャレンジしてるところがすごい。
先日の名古屋勉強会でShakespeareでLED点滅なんて話が出てたので興味本位で。
任意の関数を呼ぶのは不可能っぽいので細工しないとできないからもう諦めてますが…

# xluGlWFMRxHjG 2011/09/29 1:09 http://oemfinder.com
NbOFt2 Are you interested in webmaster`s income?!...

# UUhLGwKQedoMpqtF 2011/10/18 16:19 http://www.cpc-software.com/products/Download-Micr
Can be also this issue because the truth can be achieved only in a dispute :D

# ifSYfswUwyWVtBp 2011/10/18 17:26 http://www.best-software.net/vend-name/adobe
Good! Wish everybody wrote so:D

# gewnXQhFSLaXepPOzzd 2011/10/18 17:30 http://www.software-stock.com/brand/adobe
Cool:) I would say say it exploded my brain..!

# qSjQvFcjeBtLeroo 2011/11/02 6:07 http://optclinic.com/
Not bad post, leave it at my bookmarks!...

# dEfdljcaqgHZzsFhA 2011/11/07 19:12 http://aphrodisiaquespuissants.com
Yeah, now it's clear !... And firstly I did not understand very much where there was the link with the title itself !!...

# cKwXsZhrTSeHM 2011/11/07 19:51 http://www.farmaciaunica.com/
Stupid article..!

# xOQMBANuXaouUCswycI 2011/11/08 6:27 http://papillomasfree.com
Yet, much is unclear. Could you describe in more details!...

# UdKUczcKbhk 2011/11/08 16:05 http://www.metalland.net/loans/
Honestly, not bad news!...

# zgBfLfYtpzJbmEEW 2011/11/12 22:10 http://optclinic.com/
I subscribed to RSS, but for some reason, the messages are written in the form of some hieroglyph (How can it be corrected?!...

# RtBYoWdVtpKTqgu 2011/11/13 18:32 http://sildenafil-citrate.net/
Hi! Everyone who reads this blog - Happy Reconciliation and Accord..!

Thanks for all the answers:) In fact, learned a lot of new information. Dut I just didn`t figure out what is what till the end!...

# AuKRSRaiSxQHTV 2011/11/16 3:21 http://www.hansensurf.com/Billabong-Backpacks.html
As I have expected, the writer blurted out..!

# FAkThwsgteZ 2011/11/16 3:46 http://www.laurenslinens.com/thomasbedding.html
Very amusing thoughts, well told, everything is in its place:D

# dVSMJFjAQlA 2011/11/16 20:37 http://www.solution-naturelle.com/
Cool:) I would say say it exploded my brain..!

# <url>http://www.freeinsurquotes.com/|auto insurance quotes</url> =O <url>http://www.cheapquotes4you.com/|auto owners insurance</url> >:DDD 2012/08/24 18:20 Marylouise
<url>http://www.freeinsurquotes.com/|auto insurance quotes</url> =O <url>http://www.cheapquotes4you.com/|auto owners insurance</url> >:DDD

# diablo 3 gold 2012/10/12 17:33 http://www.d3eye.com
Hi, always i used to check web site posts here early in the dawn, since i love to gain knowledge of more and more.

# <url>http://www.car-insur-online.com/|auto insurance quotes</url> 22070 <url>http://www.getlifeinsurancequotes.net/|life insurance</url> 76121 <url>http://www.insurforall.com/|life insurance for seniors</url> 814487 2012/10/17 3:15 Jean
<url>http://www.car-insur-online.com/|auto insurance quotes</url> 22070 <url>http://www.getlifeinsurancequotes.net/|life insurance</url> 76121 <url>http://www.insurforall.com/|life insurance for seniors</url> 814487

# wow gold 2012/10/18 18:12 http://www.wowgolds.ca
Can you please email me the code for this script or please tell me in detail about this script?

# May I simply just say what a comfort to discover someone that actually knows
what they're discussing over the internet. You definitely realize how to bring an issue to light and make it important. A lot more people should look at this and understand 2012/11/08 10:34 Andrew
May I simply just say what a comfort to discover someone that actually knows what they're discussing over the internet. You definitely realize how to bring an issue to light and make it important. A lot more people should look at this and understand this side of the story. I can't believe you
are not more popular given that you definitely possess the gift.

# Led by Google, many search engines like google include your link popularity score within the algorithms they'll use to determine your website's rank.
This website assessment criteria helps you realize what your location
is compared for your compe 2012/11/22 3:11 Estella
Led by Google, many search engines like google include your link popularity
score within the algorithms they'll use to determine your website's rank.
This website assessment criteria helps you realize what your location is compared for your competitors.
It's been commonly observed that a website with long and complex URLs have harder time getting indexed when compared to a one with cleaner and shorter URLs.

# There is definately a lot to find out about this subject.
I love all of the points you have made. 2014/11/02 12:04 Evonne
There is definately a lot to find out about this subject.
I love all of the points you have made.

Post Feedback

タイトル
名前
Url:
コメント: