struct parse_context context = {
.config = {
.ignored = (1 << TK_line_comment)
- | (1 << TK_block_comment),
- .number_chars = ".,_+-",
+ | (1 << TK_block_comment)
+ | (1 << TK_mark),
+ .number_chars = ".,_+- ",
.word_start = "_",
.word_cont = "_",
},
in scope. It is permanently out of scope now and can be removed from
the "in scope" stack.
-
###### variable fields
int depth, min_depth;
enum { OutScope, PendingScope, CondScope, InScope } scope;
simple value is required, `inter_exec()` will dereference `lval` to
get the value.
-
###### core functions
struct lrval {
rv.str = text_join(left.str, right.str);
break;
-
###### value functions
static struct text text_join(struct text a, struct text b)
var_block_close(config2context(config), CloseElse);
}$
-
$*exec
// These scopes are closed in CondSuffix
ForPart -> for OpenScope SimpleStatements ${
c->prog = $<1;
} }$
-
$*binode
Program -> program OpenScope Varlist Block OptNL ${
$0 = new(binode);
###### demo: hello
const:
- pi ::= 3.1415926
+ pi ::= 3.141_592_6
four ::= 2 + 2 ; five ::= 10/2
const pie ::= "I like Pie";
cake ::= "The cake is"
// Dad taught me - the first one I ever heard of.
for i:=1; then i = i + 1; while i < size:
n := list[i-1] * list[i-1]
- list[i] = (n / 100) % 10000
+ list[i] = (n / 100) % 10 000
print "Before sort:",
for i:=0; then i = i + 1; while i < size: