LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-13-2005, 03:00 PM   #1
mhelliwell
Member
 
Registered: Feb 2005
Location: Canada, eh!
Distribution: Puppy Linux 1.x.x
Posts: 75

Rep: Reputation: 15
How does one create a language?


To create a language, is it that you create an interpreter in another language, or some other way? Thanks.
 
Old 03-13-2005, 03:05 PM   #2
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
Basically.

You create a compiler that takes your source files, reads and understands your syntax (language) and then converts it into machine language.

A common approach is to write a compiler or interpreter in C, which merely converts your source files into C code which are then passed to the C compiler to convert to machine code.
 
Old 03-14-2005, 02:21 AM   #3
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
To write compiler you need something like yacc or lex Just seach google for both of them to get more info
 
Old 03-14-2005, 02:37 AM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Well first of all you create the syntax of a language and you formalize it, using BNF for example. Then you create a lexical analyzer (lexer) which will be the first part of the compiler
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What does it take to create a client side scripting language like JavaScript? tuxfood Linux - General 1 10-04-2005 11:49 AM
which language? caminoix Programming 14 06-27-2005 04:57 PM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM
Linux, Create Dirs=no, Create files=yes. Possible? tisource Linux - General 4 01-12-2004 10:05 PM
which language? 2k. Programming 4 11-04-2003 09:44 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration