-3
votes
0answers
52 views

Question about the “option” brackets in EBNF (Extended Backus–Naur Form) [on hold]

I want to know what this expression: A-->a[b]A means. I know the [] means b is an option, but does that mean that if I convert it to the BNF it would be: 1-A-->aA|bA or 2-A-->aA|abA?
32
votes
5answers
2k views

What does “context-free” mean in the term “context-free grammar”?

Given the amount of material that tries to explain what a context-free grammar (CFG) is, I found it surprising that very few (in my sample, less than 1 in 20) give an explanation on why such grammars ...
2
votes
1answer
186 views

Resources for understanding a programming language and its specifications and grammar deeply [closed]

I'm a computer engineer and all the courses we have had about programming and computer languages were an introduction to C/Java and OOP. Now I feel like reading Java language specification to learn a ...
1
vote
1answer
399 views

How to write a syntax checker [closed]

How is a syntax checker for a programming language written? I am guessing a grammar has to be written first. How to then proceed? Motivation I'm using a programming language (Apex for Salesforce) ...
7
votes
3answers
4k views

Whats the difference between syntax and grammar?

I understand the difference between syntax and semantics - syntax - how the symbols are combined to form a valid expression or statement. semantics - the meaning of those symbols that form an ...
4
votes
3answers
289 views

Learning About Languages [closed]

I'm interested in learning more about programming languages. In particular, I'd like to look at some of the new developments in programming languages (even the really obscure ones that only academics ...