]> ocean-lang.org Git - ocean-D/commitdiff
updates
authorNeilBrown <neil@brown.name>
Sat, 18 May 2019 21:18:06 +0000 (07:18 +1000)
committerNeilBrown <neil@brown.name>
Sat, 18 May 2019 21:18:06 +0000 (07:18 +1000)
00-TODO
01-TOFIX [new file with mode: 0644]
Ocean-operators
Ocean-types

diff --git a/00-TODO b/00-TODO
index 58dae9ce76fecc8e5eae55f56aa4a58b82b46a79..b89cc9f36d96dad4b219005414e5bf2794dee200 100644 (file)
--- a/00-TODO
+++ b/00-TODO
@@ -1,16 +1,26 @@
 This is a living document - delete things when done.  Avoid discussion.
 
 This is a living document - delete things when done.  Avoid discussion.
 
+NOW:
+ - handle free_type more cleanly??
+ - rethink line-like parsing.  Should element also start a line?
+ - review simple/complex parsing options in various situations
+
 Current version (Jamison Creek)
 Current version (Jamison Creek)
-- global consts
+ - clean up
+
+Next version ??
+- spaces in numbers
+- # not comment?? - automatic if used as a mark.
+- can I move 'ok' into the parse context?  Then error functions can set it.
+- allow something so I don't need to call config2context so often
+  Some code stanza to be added to do_reduce()
 - structs
 - structs
-   - const or variable fields
-   - initial value
+   - const fields
    - anonymous field - array or struct (or pointer to these)
    - anonymous field - array or struct (or pointer to these)
+      multiple anon struct ar allowed if they don't conflict
    - [] can apply to anon array field
    - anon struct field gets fields interpolated
 
    - [] can apply to anon array field
    - anon struct field gets fields interpolated
 
-Next version ??
-
 - change 'labels' to only be created for 'use'
 - handle syntax errors better - recover quickly.
 - manifest values for arrays and structs [a,b,c]
 - change 'labels' to only be created for 'use'
 - handle syntax errors better - recover quickly.
 - manifest values for arrays and structs [a,b,c]
@@ -27,6 +37,8 @@ Next version ??
 - array buffer - can be added to and grows.
 - char, string search, regexp search
 
 - array buffer - can be added to and grows.
 - char, string search, regexp search
 
+- allow "do stuff" as a stand-allow statement (scope)
+
 
 Much later
 - functions and procedures
 
 Much later
 - functions and procedures
diff --git a/01-TOFIX b/01-TOFIX
new file mode 100644 (file)
index 0000000..361c4f9
--- /dev/null
+++ b/01-TOFIX
@@ -0,0 +1,8 @@
+------------
+This:
+    const pie ::= "I like Pie";
+        cake ::= "The cake is"
+        ++ " a lie"
+
+gives a parse error.  It thinks the NEWLINE after "The cake is"
+terminates something, but I'm not sure it should at that point.
index 12b60e20cf06e5fd043fc77f343d14dbc9fdb8da..7c75e6117739472ecb36ad6ff0e0a7e0f184e521 100644 (file)
@@ -77,3 +77,17 @@ What types do operators act one?
       convert error to type     !error
       test if value is error    ?value
       extract error code        value!
       convert error to type     !error
       test if value is error    ?value
       extract error code        value!
+
+
+PROBLEM??
+
+  a if c else b
+could have a natural precedence:
+
+  A if C else B if q else a if c else b
+would be
+  A if C else (B if q else (a if c else b))
+Hmm..  not what I imagined.  But what I imaging suggested that left-association what
+ a op b op c -> (a op b) op c
+requires that we reduce even when we could shift, ... maybe .... I should leave this
+until I do precedence.
index 4aa4e8976565620b460e5440a0580297d57d1173..16714803a186af0502d3c45205a47aec6e4501ab 100644 (file)
@@ -298,3 +298,9 @@ So I guess:
 
 or
    const { name ::= value ; name ::= value }
 
 or
    const { name ::= value ; name ::= value }
+
+--------------
+I'm in the middle of stage-1 on structures.
+
+I need a type to parse the declaration into.  It needs to be a linked list
+of fields, each of which is a type, a name, and an initial value.  i.e. a 'struct field'.