| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Change the pop to cast the pointer and take the value using a pointer to the
requested type, then return that tmp.
Previously we were taking the value using the tree type, then casting the
value. During the cast of the value the high bits are dropped, and that's where
the value actually lives, when on a big-endian system. Didn't notice the
problem on little-endian systems because it happens to work fine there.
Fixes #126.
|
|
|
|
|
|
| |
- added downref when undoing a tree push
- using correct opcode for undoing pushing stream
- added an upref when sending back ignored trees
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is identical to the basic tree iterator, except it visits ignore tokens.
This makes it possible to rewrite comments, albeit, primitively. Constructors
for tokens don't work right. Though we can set the data field.
The following code can be used to turn comments into newlines:
for I1: comment in with_ignore(Flux) {
I1.data = "\n"
}
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The trim and no-trim operators are both now in the expression. In places where
we want the print mechanism to decide if it trims or not, we lift the trim
operator out of the expression and into the send expression, then pass it to
the print and send instructions. This way the stream or input (parser) can
control the trim (auto_trim feature) with the expression overriding the
default.
|
|
|
|
|
| |
When set to true, all tree prints to the stream or sends to the input will
result in a trim. Achieved by passing trim to the generic print.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Now that we have multiple parser using the same stream it is not responsible to
set a pointer to parser from stream and rely on that to decide where to send
(or to check if it is a simple stream). Back to making the decision at compile
time.
Also switching from "stds" to "_".
|
| |
|
|
|
|
|
|
|
|
|
| |
Make it possible to set the parser input (sourced from some other parser) the
same way the parser context is set. Previously would "send" the input the same
way a stream was sent, but this was inconsistent with how the system operates.
The "send" of an input was actually a hack that replaced the input. We are not
supporting recursing input structures. Just an input and underneath that
possibly some streams or data.
|
|
|
|
|
|
|
|
| |
To detect parsing from a top level input and to avoid appending it to a
parser's top level (thus creating a tree), added a new type for input so we can
replace the parser's top level. This change forces us to a two level structure
where stream seq is at the top and stream data underneath. Requires us to hack
the destructor so that we don't multiple delete the stream impl.
|
|
|
|
| |
The SEND_EOF instruction was already in merged form.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Was doing this in the parse finish instruction. Moving this out is the last
change to make the frag and finish parses identical.
|
| |
|
|
|
|
|
| |
Will use these for sending trees as text (default). SEND_TREE will be for the
send_tree and parse_tree syntax.
|
|
|
|
|
|
| |
Gives us something to land on when we skip over parsing machinery before and
EOS send. Also will try to use this to set EOF bit, hopefully allowing us to
unify FRAG and FINISH parse operations.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This works for some instructions only. Sometimes we have revert enabled, but
need to use non-revert instructions since the objects are local to the runtime
stack. For other instructions we will take advantage of the availability of a
revert state bit in order to simplify the implementation.
|
|
|
|
|
|
| |
Idea with this is that all writing should be done on streams. If there is a
parser behind the stream then that indicates we need to call into the parsing
machinery to process what is being sent.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Going to eliminate the specialized print forms, instead opting for functions.
Later on we can make these lazy.
|
| |
|
|
|
|
|
| |
Using LEL was a hack to make it work quickly, usig a non-tree type is the
proper solution.
|
|
|
|
|
| |
Added a form to case statements that accepts a production name instead of a
pattern.
|
| |
|
|
|
|
| |
Triggers the generation of the reducer. Accepts a stream.
|
|
|
|
|
| |
Postfix notation can be used as a streaming tree format as both an output and
input.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is much faster than send to a line parser and then extracting the tree
just to convert it to txt.
|
| |
|
| |
|
|
|
|
|
|
| |
First track if the result is used. If not, we can remove parse trees at commit
points. This is also the time to execute reduction actions so we can load as we
parse. Not currently enabled (by way of omitting setting of not-used bit).
|
| |
|
| |
|
| |
|