One step at a time.
No seriously, start with expressions and operators, work upwards to statements, then to functions/classes etc. Keep a list of...Best answer · 32
You'll want to have a look at EBNF (Extended Backus-Naur Form).
(Assuming you want to write a context free grammar, that is.)10
If you mean defining a grammar, you would be best served by starting with an existing language and modifying its grammar to match what it is that y...3
Have a look at Bison, maybe that's what you are looking for?1
You'll need to know quite a lot about programming languages before you start designing one. I recommend Programming Languages: Application and Inte...0
An affix grammar is a kind of formal grammar; it is used to describe the syntax of languages, mainly computer languages, using an approach based on how natural language is typically described.
An attribute grammar is a formal way to supplement a formal grammar with semantic information processing.
Semantic information is stored in attributes associated with terminal and nonterminal symbols of the grammar.
The values of attributes are result of attribute evaluation rules associated with productions of the grammar.
Attributes allow to transfer information from anywhere in the abstract syntax tree to anywhere else, in a controlled and formal way.
Notation techniques for grammars in computer science
In computer science, a Van Wijngaarden grammar is a formalism for defining formal languages.
The name derives from the formalism invented by Adriaan van Wijngaarden
for the purpose of defining the ALGOL 68 programming language.
The resulting specification remains its most notable application.