6 Replies - 2349 Views - Last Post: 13 August 2012 - 04:32 PM

#1 Monster99d  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-July 12

My programming language program

Posted 09 August 2012 - 06:26 PM

I am creating a programming language. My question to you guys is, how do I make sure that I fully completed my syntax without forgetting to add in something very specific that can easily be overlooked?
Is This A Good Question/Topic? 0
  • +

Replies To: My programming language program

#2 sepp2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2101
  • View blog
  • Posts: 3,204
  • Joined: 21-June 11

Re: My programming language program

Posted 09 August 2012 - 06:34 PM

The question is a bit vague.

Do you mean how to make sure that you didn't forget to implement parts of the language? By having extensive test coverage.

Or do you mean how to make sure that your language design isn't missing some features that are important to make your language usable? In that case develop a sufficiently complex sample application in your language. If you're missing any important features, you'll figure it out while working on that project.
Was This Post Helpful? 2
  • +
  • -

#3 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3552
  • View blog
  • Posts: 11,009
  • Joined: 05-May 12

Re: My programming language program

Posted 09 August 2012 - 06:37 PM

+1.

In short, testing. Testing by test coverage, and testing by "dogfooding" your own language.
Was This Post Helpful? 1
  • +
  • -

#4 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 769
  • View blog
  • Posts: 2,246
  • Joined: 20-March 10

Re: My programming language program

Posted 09 August 2012 - 06:39 PM

You would parse the syntax
To get your command compare that
Against a list of valid commands
Compare the parameters one by one
Again using parsing to see if they match
Up to the correct parameters.

If you search the Tutorials section
There is a tutorial on how to write
An interpreter there.

Here it is here by Martyn.rae

Writing an interpreter

Snoopy.

This post has been edited by snoopy11: 09 August 2012 - 06:43 PM

Was This Post Helpful? 1
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: My programming language program

Posted 10 August 2012 - 02:53 AM

Moved to Software Development; there's nothing C/C++ in this.
Was This Post Helpful? 0
  • +
  • -

#6 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3552
  • View blog
  • Posts: 11,009
  • Joined: 05-May 12

Re: My programming language program

Posted 10 August 2012 - 04:04 AM

Or you can design your language like Forth: It can compile itself from its own source code. Additionally, at runtime, if you don't have the language functionality you need, just write it yourself and save it as part of the system vocabulary. From that point onward it's part of the language.
Was This Post Helpful? 0
  • +
  • -

#7 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 1954
  • View blog
  • Posts: 4,053
  • Joined: 11-December 07

Re: My programming language program

Posted 13 August 2012 - 04:32 PM

I guess the baseline to aim for is Turing completeness. Anything on top of that is highly-usable syntactic sugar.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1