sulyi
a89d4906e7
[jsinterp] TokenStream, expression mock up
...
- new class TokenStream with peek and pop methods
- _assign_expression handling precedence
- new logical, unary, equality and relation operators
- yet another try replacing OrderedDict
- minor change in lexical grammar
allowing identifiers to match reserved words
_chk_id staticmethod has been added to handle it
in syntactic grammar
2016-12-03 06:32:11 +01:00
sulyi
67d56532e3
[jsinterp] Minor quick fixes
...
- missing enumerate in op_ids and aop_ids
- order of relation and operator regex in input_element
2016-11-30 08:04:08 +01:00
sulyi
a0fa6bf88e
[jsinterp] Parser mock up
2016-11-30 07:49:47 +01:00
sulyi
aa7eb3d6c1
[jsinterp] No OrderedDict
2016-11-30 07:37:47 +01:00
sulyi
9bd5dee5ce
[jsinterp] Value parsing
2016-11-28 13:14:37 +01:00
sulyi
b089388f26
[jsinterp] Lexer overhaul
2016-11-28 06:53:28 +01:00
sulyi
ba5a40054a
[jsinterp] Simpler regex regex (+more TOTO)
2016-11-26 04:45:55 +01:00
sulyi
c485fe7e5d
[jsinterp] Reject method call when name is empty (+reminder TOTOs)
2016-11-26 01:47:39 +01:00
sulyi
8842f08df3
[jsinterp] String literal regex change
2016-11-26 01:13:44 +01:00
sulyi
71a485fdb6
[jsinterp] Complex call test (thx to yan12125)
2016-11-25 22:41:33 +01:00
sulyi
da73cd90ec
[jsinterp] Quick regex fixes (thx to yan12125)
2016-11-25 22:31:58 +01:00
sulyi
2076b0bb3c
[jsinterp] Clean up
2016-11-25 21:54:25 +01:00
sulyi
8c87a18029
[jsinterp] Calling field and test
2016-11-24 22:33:30 +01:00
sulyi
cc895cd712
[jsinterp] Parsing expr (cleanup needed)
2016-11-24 21:48:11 +01:00
sulyi
2c85715b93
[jsinterp] Handling comments
2016-11-23 06:19:57 +01:00
sulyi
d328b8c6c2
[jsinterp] Actual parsing
2016-11-23 02:34:20 +01:00
Kacper Michajłow
189935f159
[jsinterp] Fix function calls without arguments.
2016-11-11 15:36:57 +01:00
Sergey M․
b46eabecd3
[jsinterp] Relax JS function regex ( Closes #9863 )
2016-06-23 09:41:34 +07:00
Philipp Hagemeister
1f749b6658
Revert "[jsinterp] Avoid double key lookup for setting new key"
...
This reverts commit 7c05097633138459e9bdf7e10738e021b04689a7.
2016-06-20 13:29:13 +02:00
Lucas Moura
7c05097633
[jsinterp] Avoid double key lookup for setting new key
...
In order to add a new key to both __objects and __functions dicts on jsinterp.py, it is
necessary to first verify if a key was present and if not, create the key and
assign it to a value.
However, this can be done with a single step using dict setdefault method.
2016-06-19 03:29:45 +07:00
Sergey M․
b95779be21
[jsinterp] Extend function regex ( Closes #7900 , closes #7901 )
2015-12-18 18:57:49 +06:00
Philipp Hagemeister
4c7d816dd7
[jsinterp] Adapt to updated YouTube code generation ( Fixes #7623 , fixes #7624 , fixes #7625 , fixes #7626 )
2015-11-24 07:45:38 +01:00
Yen Chi Hsuan
ff29bf81f8
[jsinterp] Support alternative function definition form
2015-11-10 12:54:02 +08:00
Philipp Hagemeister
3eff81fbf7
[jsinterp] Disable comment support
...
We need a proper lexer to be able to understand YouTube's code, which contains /* inside of strings.
For now it's sufficient to just disable comment support altogether.
Fixes #4976 , fixes #4979 , fixes #4980 , fixes #4981 , fixes #4982 .
Closes #4977 .
2015-02-18 10:47:42 +01:00
Philipp Hagemeister
8cfb6efe6f
[jsinterp] Correct div command
2015-02-02 01:49:32 +01:00
Philipp Hagemeister
9e3f19919a
[jsinterp] Beef up and add tests
...
In preparation for #4822 , extend jsinterp by a lot. (We may even have to/want to write a proper interpreter with actual parsing)
2015-02-01 22:38:29 +01:00
tinybug
85b9275517
Update jsinterp.py
...
http://s.ytimg.com/yts/jsbin/html5player-zh_HK-vfl1NK6PR/html5player.js
fix raise ExtractorError
2014-11-21 17:09:22 +08:00
Philipp Hagemeister
4cb71e9b6a
[jsinterp] Fix slice
2014-07-25 07:04:39 +02:00
Philipp Hagemeister
16f8e9df8a
[jsinterp] Allow uppercase object names
2014-07-25 06:54:52 +02:00
Philipp Hagemeister
892e3192fb
[jsinterp] Do not expect dot in simple function call
2014-07-24 11:33:42 +02:00
Jaime Marquínez Ferrándiz
ebe832dc37
[jsinterp] 'reverse' modifies the array in place ( fixes #3334 )
2014-07-24 11:08:31 +02:00
Philipp Hagemeister
825abb8175
[jsinterp] Implement splice and general improvement
...
I still get 403s on YouTube though.
2014-07-24 10:41:14 +02:00
Philipp Hagemeister
9f43890bcd
[jsinterp] Allow digits in function names
2014-07-23 02:13:48 +02:00
Jaime Marquínez Ferrándiz
ad25aee245
[youtube & jsinterp] Fix signature extraction ( fixes #3255 )
...
Some functions are defined now inside an object, the jsinterp will search its definition if the variable is not defined in the local namespace.
2014-07-15 22:46:39 +02:00
Philipp Hagemeister
fc040bfd05
[jsinterp] Prevent mis-recognitions of local functions
2014-07-11 10:44:56 +02:00
Philipp Hagemeister
61989fb5e9
[jsinterp] Remove superfluous u
2014-07-11 10:40:02 +02:00
Philipp Hagemeister
77ffa95701
[jsinterp] Better error messages
2014-03-30 07:15:14 +02:00
Philipp Hagemeister
2b25cb5d76
[youtube] Move JavaScript interpreter into its own module
2014-03-30 07:02:58 +02:00