This is the patch to support the uniline yield/return we talked 2
weeks ago. I know that Leo advocate to separate the
implementation of PASM and PIR. By retailoring the grammar and
the code such patches paves the way for such a separation.
As suggested by Dan and Leo. The uniline return syntax uses
parentheses to distinguish it from other uses of the .return
directive. To be consistent, so does the uniline yield syntax. I
think this is good because it makes sequence breaks more
conspicuous.
I propose to eventually deprecate the multiline syntax because it uses
pcc_begin_return and pcc_end_return. I find these "pcc_" prefix
in directives confusing.
modified files:
imcc/imcc.y # modified grammar
imcc/imcc.l # added ".yield" token
imcc/parser.h # added an enum and vars to track parser state
imcc/t/syn/pcc.t # added tests
imcc/t/syn/macro.t # an error message has changed
imcc/docs/calling_conventions.pod # added doc
# files generated by flex and bison
imcc/imcparser.c
imcc/imcparser.h
imcc/imclexer.c
I am working on a patch to get more meaningful imcc errors. This
involves defining clearly separate name spaces for asembly ops,
labels, symreg names. Currently these spaces overlap fuzzily to
say it gently.
I am not yet sure of the best way to minimize breakage.
--
stef
Thanks, applied.
leo