Skip to content

phillvancejr/Spirit_X3_Lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language with Boost Spirit X3

Tiny language to test Spirit x3. Not a complete language, lacks proper error handling, etc. Spirit x3 is okay if you don't want to write a compiler from scratch. But I didn't find the documentation great and it's hard to search for answers as it seems not many people use x3. That being said it was very fast to write even considering I was learning the library while writing this program. I wrote this in a single day without any previous knowledge of Spirit so despite some annoyances it is still a very fast way to get a compiler written without a ton of effort.

Print 15, then "Hello World"

a = 10
b = 5
print_num(a + b)
print_char(72)
print_char(101)
print_char(108)
print_char(108)
print_char(111)
print_char(10)