Commit Graph

62 Commits

Author SHA1 Message Date
z7zmey
777873afae [#82] add new token constants 2019-12-24 16:16:35 +02:00
z7zmey
d2c76460ab scanner refactoring 2019-12-21 14:44:25 +02:00
z7zmey
e4a208e2a9 [#93] fix scanning constant strings 2019-06-07 09:33:35 +03:00
z7zmey
6bef3167cb [#91] add test for byte chars in variable name 2019-06-06 21:32:58 +03:00
Ganlv
69f7ff2216 Fix #91
Add support for \x80-\xff.
Change \x7f-\xff to \x80-\xff.
2019-06-03 22:22:05 +08:00
z7zmey
2c649159c7 #80 implement Ragel based lexer 2019-03-20 21:06:56 +02:00
z7zmey
32d9c634d1 remove kylelemons/godebug 2019-02-25 18:12:39 +02:00
z7zmey
a7229f53dd rename flag -meta to -ff 2019-02-25 16:52:47 +02:00
z7zmey
b3800a2595 rename meta to freefloating; refactoring 2019-02-25 15:01:57 +02:00
z7zmey
d155c563ef Merge branch 'master' into dev 2018-11-05 17:14:09 +02:00
z7zmey
69e3111221 #67: skip unexpected character in input 2018-11-05 16:56:27 +02:00
z7zmey
b805f0b167 #62: save the all text after __halt_compiler(); as Meta 2018-09-13 20:07:50 +03:00
z7zmey
4989d31874 #51 saving optional tokes and tokens that have different representation as meta 2018-08-09 11:46:56 +03:00
z7zmey
0138749c6d Merge branch 'master' into dev 2018-07-24 22:24:32 +03:00
z7zmey
623a90a418 #56: now, __halt_compiler(); terminates parsing process 2018-07-24 21:49:26 +03:00
z7zmey
1a495d615b #58: fixed /**/ comment termination 2018-07-23 20:50:02 +03:00
Vadym Slizov
4d2484867b
Merge pull request #59 from imuli/slash-star-slash
prevent interpreting `/*/` as an entire comment
2018-07-23 20:28:05 +03:00
z7zmey
96265403d0 #57 test 2018-07-23 19:27:06 +03:00
Imuli
5675714af8 accept backslash newline in single quotes
fixes #57
2018-07-20 19:55:01 -04:00
Imuli
3f86e882d3 prevent interpreting /*/ as an entire comment
fixes #58
2018-07-20 07:14:53 -04:00
z7zmey
f89d7d3a17 Merge branch 'master' into dev 2018-07-14 18:38:10 +03:00
z7zmey
867095823d fixed bug when heredoc starts by \; removing \n from a heredoc value end 2018-07-14 18:00:48 +03:00
Imuli
3ba2d2a91b distinguish unknown unicode characters from EOF 2018-07-14 08:06:00 -04:00
z7zmey
4da7b36056 created TokenPool 2018-07-12 10:53:36 +03:00
z7zmey
15a1a81924 #13: the printer prints nodes with meta(comments and whitespaces) saved by the parser 2018-07-08 01:48:52 +03:00
z7zmey
c4c0934c51 tokens constants moved to lexer_tokens.go 2018-07-08 01:06:49 +03:00
z7zmey
e90df8ef5f #33 comment package has renamed to meta and parser now saves whitespaces 2018-06-30 23:23:19 +03:00
z7zmey
1ebb0c6fad #25: save position within node 2018-06-25 23:30:10 +03:00
z7zmey
bfc346ebab #40 reduce memory allocations for position.Position by using sync.Pool 2018-06-12 21:14:11 +03:00
z7zmey
2737e98559 #27 reduce memory allocations for scanner.Token by using sync.Pool 2018-06-12 19:37:22 +03:00
z7zmey
af379a61dd Merge branch 'comments3' 2018-06-07 15:06:54 +03:00
z7zmey
d72d3b7980 refactor tokenString 2018-06-05 15:20:23 +03:00
z7zmey
95c257c0f6 add (binary) cast 2018-06-05 12:24:24 +03:00
z7zmey
788628d902 #21 scanner.Lexer.charsToBytes optimization 2018-06-05 01:52:04 +03:00
z7zmey
e396f81eea php7: save all comments 2018-05-27 18:07:26 +03:00
z7zmey
a9f54cba27 scanner: remove unnecessary lval.Token calls 2018-05-27 18:04:18 +03:00
z7zmey
e7a9de3dfc #18 replace heredocLabel variable from global 2018-05-24 12:14:30 +03:00
Imuli
d73ea72530 the simple fix for #14 (panic on 32-bit)
FileSet starts `base` at 1, and adds `size+1` for every file.
  So with 32 bit ints, anything larger than 2³¹-3 overflows.
2018-05-15 09:59:04 -04:00
z7zmey
435dc5c706 scanner.NewToken returns pointer, and scanner.Token saves position as position.Position 2018-04-15 22:59:06 +03:00
z7zmey
781a55659b save comment position 2018-04-15 21:39:26 +03:00
z7zmey
c2f938e55c merge DocComment and PlainComment 2018-04-15 15:55:33 +03:00
z7zmey
e65ace8984 merge token package into scanner package 2018-04-15 14:47:40 +03:00
z7zmey
983c721e83 scanner: fix scanning empty inline comment 2018-04-11 00:58:57 +03:00
z7zmey
9a799fc3be scanner: fix heredoc 2018-04-06 00:24:00 +03:00
z7zmey
9ea1f05f90 add Heredoc node 2018-04-05 13:55:01 +03:00
z7zmey
5edfa095cb remove redundant nop before inline html 2018-04-02 00:02:13 +03:00
z7zmey
0a85cf2e1f issue #2 - fix backqouted strings
now it works as template strings
2018-03-30 18:35:18 +03:00
z7zmey
148cf59e9d issue #2 - fix single line comment
fix handling end of file
add handling php close tag
2018-03-30 17:46:04 +03:00
z7zmey
d31819db30 issue #2 - deny numbers and slashes in first char in variable name 2018-03-30 14:28:50 +03:00
z7zmey
07f02e4497 issue #2 - fix template string scanning
now it correctly check first char of variable
2018-03-30 12:23:18 +03:00