Hi Guys... I m in immediate need of the solution for writing a syntax analyser using lex and yacc....here the language i m using is C on Linux... (Red Hat...
Hi, Can any one please tell me what type of parser is used in most of the modern c/c++ compilers? I am actually interested in knowing as to what is the look...
I hope everyone had a good new year. I have been very busy over the last few months with travel and just had a moment to revisit my compiler project I was...
... Take a look at Wirth's Pascal-S for one approach: www.moorecad.com/standardpascal/pascals.html has a good discussion of Pascal-S, and the original paper...
... Thanks, I'll take a look. I also found that COCO/R (I don't know how I missed this) does, as well as one called wacco: www.codegen.com/freesoft/wacco.tgz ...
What I originally thought is I'd need to define my stack as something like: unsigned char stack[32768]; // 32k stack. Can someone comment on this concept and...
CRANFORD, CHRIS
Chris.Cranford@...
Jan 26, 2006 2:27 pm
596
... Do you need to fetch objects off in larger chunks than a byte at a time? I.e. is an integer fetch something like I = stack[SP] << 24 | stack[SP+1] << 16 |...
Yes, I will need to be able to put 32-bit addresses, integers, longs, floats, etc on the stack. Can you provide me an example of how to push these types of...
CRANFORD, CHRIS
Chris.Cranford@...
Jan 26, 2006 5:09 pm
598
... off the top of my head, not run through a compiler... // method 1: ignore alignment, do everything a byte at a time #define push(x) push(&x, sizeof(x)) ...
When you say that it does not work well with binary code, are you refering to an actual executable binary file or just storing the data in an intermediate file...
CRANFORD, CHRIS
Chris.Cranford@...
Jan 26, 2006 7:08 pm
600
... Executable. When fully compiled a single store into the stack should be a single instruction, not four plus overhead. When compiling, you generally know...
Graham, Again, thanks for all your help. I know we may have spoke about this in the past, but what about floats/doubles? These are 8-bytes. I extended your...
CRANFORD, CHRIS
Chris.Cranford@...
Jan 27, 2006 1:16 am
602
Hi there, I am new to this group, and I hope someone could help me, sorting out my question? I have had a look at Fabrice Bellard's otcc(n) Compiler. I am very...
... I'm not sure there is any special name for it, or any special technique. Basically his compiler is a straight-forward 1960's style 'student system'...
hi there I have been looking for some time for an easily (not GCC!) retargetable compiler, generating assembly code for RISC processor ISAs from ANSI C. This...
... http://www.cs.princeton.edu/software/lcc/index.html http://www.cs.virginia.edu/~lcc-win32/ I can't think of any that do either, so start thinking which of...
... I don't see why LCC does not fit all your needs... Plus, it is documented in a book (even though it is lcc 3, it is close enough to lcc 4). Laurent...
Hello, I'm writing a lazy interpreter for a functional programming language. I've written my lexical analyzer in Lex, and parser in YACC. I want to generate...
Hi Haifa, Is this a class homework or just a personal project? ... Remember that in YACC, you've got three sections: the declaration, rules and user subroutine...
Hi Raheem, Thanks for the feedback and help. ... It's a personal project! Since what you're writing is an interpreter, ... Actually in order for it to be a...
Hi Haifa, ... Are you saying that what you really want to do is translate code in the language of your grammar into a program in lambda calculus, which is a...
... I actually meant to say "attributes of identifiers" rather than "values of variables" here. That way you symbol table will includes not just varibales, but...
Hiya Raheem (and everyone else) Firstly i can't thank u enough! You're really helping me put this all in perspective :) Ok lazy evaluation is basically...
... You can do lazy evaluation trivially without needing lambda calculus. The latter somewhat requires creating functions on the fly as first-class objects,...
Hi Group. I recently ported Jack's 'Tiny' compiler to C, and added some additional functionality (article published in January's C/C++ Users Journal). Anyway,...
... Pete, I've been looking over your compiler and I see that you've also modified the Tiny language to be (slightly) more C-like than the original which was...