Qi Xiao
27a548488f
More sensible parsing of command leaders.
2016-02-14 20:06:18 +01:00
Qi Xiao
9eaca63c9b
parse: Force parsing of form head.
2016-02-14 19:58:36 +01:00
Qi Xiao
eda20bad02
Fix while
, for
only running one loop; fix do
.
...
This complete resolves #104 .
2016-02-14 19:52:23 +01:00
Qi Xiao
ec9a628ba0
Implement for
.
2016-02-14 19:42:08 +01:00
Qi Xiao
26006a03f4
Parse the for
form correctly.
2016-02-14 19:18:10 +01:00
Qi Xiao
6e1090b887
Implement control structures except for for
.
2016-02-14 19:13:12 +01:00
Qi Xiao
4b3d18442a
Use outer product semantics for indexing.
2016-02-14 18:13:53 +01:00
Qi Xiao
0e981ee6de
Preliminary parsing of control structures.
2016-02-14 15:29:00 +01:00
Qi Xiao
4ac2572555
Add a test case against parse.Parse.
2016-02-11 22:59:21 +01:00
Qi Xiao
dad3ddd86e
Update comment.
2016-02-11 20:28:18 +01:00
Qi Xiao
2fb73f4680
parse: Implement tryAssignment by tracking ps.errors.
2016-02-10 21:33:56 +01:00
Qi Xiao
8125e2f9e6
golint fixes.
2016-02-07 23:23:16 +01:00
Qi Xiao
9e40b129e1
Implement basic wildcard.
...
Implicit concat in compounds is much more strict now.
2016-02-07 20:39:03 +01:00
Qi Xiao
70f362667a
Compiling incomplete redir is now safe.
2016-02-07 19:10:52 +01:00
Qi Xiao
7603a83a98
Parse tildes; fix highlighting of wildcards.
2016-02-07 14:14:13 +01:00
Qi Xiao
64401af225
Variable nodes now have the variable name in .Value.
2016-02-07 02:31:11 +01:00
Qi Xiao
a41182a48a
Parsing of ?( and []{ is now safe; quote \n with '
2016-02-07 00:41:31 +01:00
Qi Xiao
e6bb065d4e
Parsing of incomplete maps is now safe.
2016-02-07 00:10:41 +01:00
Qi Xiao
74ae20cb8e
parse: Fix for last commit.
2016-02-06 23:29:38 +01:00
Qi Xiao
0ca923b38c
parse: Put the cutset in parser.
2016-02-06 23:17:57 +01:00
Qi Xiao
015def2d01
Cosmetics.
2016-02-06 17:13:53 +01:00
Qi Xiao
d7bd90e89e
parse: Add tests against error reporting.
2016-02-06 13:51:12 +01:00
Qi Xiao
954c75e16e
parse_test.go: Top down; comments.
2016-02-06 13:43:28 +01:00
Qi Xiao
4b7746e95a
Fix test cases.
2016-02-06 00:43:51 +01:00
Qi Xiao
c5c5a7ddcd
Fix parsing of assignment forms and the = builtin.
2016-02-06 00:43:29 +01:00
Qi Xiao
ddb7396046
Highlight compiling errors.
...
This fixes #64 .
2016-02-05 23:25:13 +00:00
Qi Xiao
5c8a8d5eec
Make parse report all errors.
2016-02-06 00:08:39 +01:00
Qi Xiao
af9ca8cd14
parse: Order pprint.go top-down; expose pprint{AST,ParseTree}
2016-02-05 23:13:28 +01:00
Qi Xiao
36578d2203
parse: Reorganize parse.go in top-down order.
2016-02-05 23:04:39 +01:00
Qi Xiao
3e0dc9c57b
parse and compile argumentless lambdas
2016-02-05 01:04:52 +01:00
Qi Xiao
6a5f6bf244
indexed -> indexing
2016-02-03 15:36:12 +00:00
Qi Xiao
b775b97b66
parse: reader -> parser
2016-02-02 18:39:44 +00:00
Qi Xiao
b3138a842e
parse: Make spaces also separators in braced list
2016-02-02 18:24:36 +00:00
Qi Xiao
e2a35509f9
parse: parse assignments; consolidate Chunk.parse
2016-01-31 19:47:52 +01:00
Qi Xiao
506be658f2
parse: cleaner handling of Redir.Dest
2016-01-31 17:03:28 +01:00
Qi Xiao
3823161fab
parse: fix broken parent of Redir.Dest; add test
2016-01-31 17:01:42 +01:00
Qi Xiao
c78fc6aa5b
parse: addSep now infers begin itself
2016-01-31 16:51:32 +01:00
Qi Xiao
82e027e435
Exitus -> Error
2016-01-30 17:11:43 +01:00
Qi Xiao
651c5b76e7
parse: add package doc
2016-01-29 03:00:11 +01:00
Qi Xiao
00999a6de3
support backquotes for output capture
2016-01-29 01:56:34 +01:00
Qi Xiao
a92c371467
parse: the first char of variable name can now be anything
2016-01-27 21:22:47 +00:00
Qi Xiao
8ac6dce0e4
parse: make backup after a read of EOF behave correctly
...
This is done by introducing an "overEOF" count, so that when rd.next() == EOF,
rd.backup() does nothing. This behavior is needed for some incomplete inputs.
2016-01-26 14:54:24 +01:00
Qi Xiao
5c64fa16e0
parse: support comments
2016-01-25 21:57:31 +01:00
Qi Xiao
aedf2120f8
parse: Always return whatever has been parsed
2016-01-24 19:19:44 +01:00
Qi Xiao
4b2fbce4bc
parse: Don't expose Node.N()
2016-01-24 19:04:15 +01:00
Qi Xiao
233a8f4b07
parse-ng -> parse
2016-01-24 18:15:21 +01:00
Qi Xiao
4f827d4c05
Remove parse
2016-01-24 18:15:20 +01:00
Cheer Xiao
4c53900be9
Remove unused struct
2015-07-06 20:02:41 +02:00
Cheer Xiao
7d632d2714
Remove ItemTypeCount
2015-02-27 02:36:53 +01:00
Cheer Xiao
c1ffe6d885
Use stringer to generate ItemType.String implementation
2015-02-27 02:35:39 +01:00