esa / opengeode

OpenGEODE - a free SDL State Machine editor for space applications...and more
https://opengeode.net
GNU Lesser General Public License v3.0
69 stars 20 forks source link

Add support for ASN.1 constants #22

Closed dbrabera closed 10 years ago

dbrabera commented 10 years ago

Added support for ASN.1 constants both in the parser and the LLVM backend.

maxime-esa commented 10 years ago

gcc -c og.s og.s: Assembler messages: og.s:111: Error: invalid character '"' in operand 1 og.s:164: Error: invalid character '"' in operand 1 og.s:226: Error: invalid character '"' before operand 1 og.s:244: Error: invalid character '"' in operand 1 Makefile:17: recipe for target 'test-llvm' failed

line 111 of og.s movl $"default-str", (%esp)

and in og.ll: @default-seqof = external global %SeqOf @default-str = external global %My_OctStr

If I replace the dash with underscore, it compiles fine

dbrabera commented 10 years ago

Interestingly, I can't reproduce the error. My llc version 3.3 escape the dash characters generating lines like this:

movl $default_2D_seqof, %esi

Anyway, It's easy to solve. I will make a pull request.

maxime-esa commented 10 years ago

Weird, as mine is version 3.4.2 (LLVM version) Anyway, after your last update, it works perfectly.