No Result
View All Result
Vebiza
  • World News
    • Africas
    • Americas
    • Asia
    • Europe
    • Middle East
  • Sports
  • Business
  • Entertainment
  • Health
  • Technology
  • Money
  • Lifestyle
  • Billionaires
Vebiza
No Result
View All Result
Home Technology

How to Create a Programming Language

Khalid Rowell by Khalid Rowell
June 9, 2024
in Technology

More

funny and ingenious techniques to block telemarketers and spam callers

Funny and Ingenious Techniques to Block Telemarketers and Spam Callers

June 19, 2025
how to report spam texts on an iphone

How to report spam texts on an iPhone

June 19, 2025
Load More

 Many
people have difficulties, or frustrations with

the
programming languages they use every day.
Some
want things to be handled more abstractly;
while
others dislike implementing features they
wish
were ‘standard’. Whether you are a
professional
IT, or just a hobbyist, many times you
may
find yourself wanting to create a new
programming
language.
(1)
Become
familiar with terminology
.
  Compiler writers often use
unfamiliar

terminology. Read up on
compilers before
proceeding. Be sure to know
everything that
you need to know.
(2)
Decide
what problem your language is
solving. 
Is it
addressing a domain-specific
problem, or is it a general purpose
Are
you going to have allow direct pointer
access
or not?
What
are the types of your language?
Is it
a static or dynamic language?
How is
your memory model? Are you going
to use
a garbage collector or manual
memory
management? (If you use a
garbage
collector, prepare to write one or
adapt
an existing one to your language)
How
are going to handle concurrency? Are
you
going to use a simple
threading/locking
model or something
more
complex like Linda or the actor
model?
(Since nowadays computers have
multiple
cores)
Are
there primitive functions embedded in
the
language or everything will come from
a
library?
What
is the paradigm or paradigms of you
language?
Functional? Object-oriented?
Prototype
(like in javascript)? Aspectoriented?
Template
oriented? Or
something
entirely new?
How is
your language going to interface
with existing
libraries and languages
Finally
some of the answers to this
questions
are going to be answered by the
second
step and will help you answer the
next
step.
(3)
Think of some specific tasks
that someone
would want to be able to perform
with your
language.
 For example, ‘they may want to

direct
a robot to follow a line’ or ‘they may
want
to create relatively portable desktop
programs
in it’ or ‘they may want to create
web
applications with it’.
(4)
Experiment with syntax ideas
(the text of
the language) for the above
examples
.
 Be careful,
in order to keep your language

in the
Context-Free language category or
something
inside it, your parser generator
and
you will appreciate it later on.
(5)
Write out a formal grammar for
the syntax
.
Decide whether the language will
be
interpreted or compiled.
 Meaning that inthe interpreted world your user
will typically

edit
your program in an editor, and run itdirectly on the interpreter; while
 in thecompile
world, your user will edit your
program,
compile it, save the resulting
Also think on
how your
compiler/interpreter
will warn your user
about
erroneous programs and that a
syntax
error occurred.
 (6)
Use the parser information to
write the
object code or an intermediate
representation. 
So the parser create anAST
tree, from the AST Tree, create your

object
code using three address code or it’s
big
brother SSA, then create a symbol table,
in
order to define your functions, global
variables,
etc. (Generally a binary tree)
Also
depending on your language you may
also
want to create virtual pointer tables,
or
information tables for you classes ( in
order
to support reflection or RTTI).
(7)
Write the executor or code
generator, that
will bind everything together.
Write many test programs to test
the
language.
You
want to create programs that stress
the burdens
of your formal grammar, in
order
to see that your compiler accepts
everything
that is inside your definition
and rejects
everything that is outside of it.
(8)
If,
your language uses a standard library
you
will want to write it
. Along with a
garbage collector or other
runtime features
if you need it.
Specifically if you write a
compiler, the
code that the operating system
will
execute in order to begin
running the user
code, for example allocating all
global
variables.
(9)
Publish
your language, along with the
specification
for it and some examples of
what
you can do in it
.
When you about to publish your language
don’t forget to document how you
can
integrate with existing
libraries, languages
and how to use the runtime
features
and/or standard library.

Related Posts

the best all in one computers
Technology

The Best All-in-One Computers

June 18, 2025
the greatest watches and fitness trackers for everyone
Technology

The Greatest Watches and Fitness Trackers for Everyone

June 18, 2025
the greatest laptops for playing and working anywhere
Technology

The Greatest Laptops for Playing and Working Anywhere

June 18, 2025
the greatest e reader available right now
Technology

The greatest e-reader available right now

June 18, 2025
how to break free from internet dependency
Technology

How to Break Free from Internet Dependency

June 17, 2025
make and send jokes through phallic error messages
Technology

Make and Send Jokes Through Phallic Error Messages

June 17, 2025

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

BROWSE BY CATEGORIES

  • Americas
  • Asia
  • Billionaires
  • Biography
  • Business
  • Celebrity
  • China
  • Entertainment
  • Europe
  • Football
  • Health
  • India
  • Investment
  • Iran
  • Israel
  • Israel Gaza War
  • Lifestyle
  • Money
  • North America
  • Spain
  • Sports
  • Technology
  • Ukrain
  • United Kindom
  • United States
  • World News

Recent News

  • Top 5 WWE commentators’ pay
  • Ronaldo Wins the Esteemed Champions League Trophy
  • Five well-known poets who made a lasting impression on literature

Category

  • Americas
  • Asia
  • Billionaires
  • Biography
  • Business
  • Celebrity
  • China
  • Entertainment
  • Europe
  • Football
  • Health
  • India
  • Investment
  • Iran
  • Israel
  • Israel Gaza War
  • Lifestyle
  • Money
  • North America
  • Spain
  • Sports
  • Technology
  • Ukrain
  • United Kindom
  • United States
  • World News
  • About
  • Contact
  • Terms of Service
  • Privacy Policy
  • Advertise

© 2025 - All right reserved

No Result
View All Result
  • World News
  • Sports
  • Business
  • Entertainment
    • Celebrity
  • Health
  • Technology
  • Money
  • Lifestyle
  • Billionaires

© 2025 - All right reserved