You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Otto Fowler (JIRA)" <ji...@apache.org> on 2017/08/06 01:30:00 UTC

[jira] [Commented] (METRON-693) Stellar REPL lets reserved tokens be used as unusable variable names

    [ https://issues.apache.org/jira/browse/METRON-693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115570#comment-16115570 ] 

Otto Fowler commented on METRON-693:
------------------------------------

A couple of problems here
* There is no complete way to get all the namespace reserve words at runtime right now, without hard coding the lists.  Unless we come up with a generation scheme.
* We don't actually send the L value to Stellar for evaluation,  Stellar doesn't have Assignment.  So we don't get any errors.
* Do we want to have a 'lookup' and do it outside of execution? or do We want to change how we call Stellar so that it does the work for us?

As noted, we don't do assignment, but if we did having stellar evaluate:

Foo = "x"   to return X  would do it I *think*

 

> Stellar REPL lets reserved tokens be used as unusable variable names
> --------------------------------------------------------------------
>
>                 Key: METRON-693
>                 URL: https://issues.apache.org/jira/browse/METRON-693
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Justin Leet
>            Assignee: Justin Leet
>            Priority: Minor
>
> Reserved tokens like '=' can be assigned with the variable assignment operator.  These "variables" can no longer be used, but show up in the %vars command.  Reserved tokens should be disallowed.
> Example
> {code}
> [Stellar]>>> test := 1
> [Stellar]>>> 2 + 2 := 5
> [Stellar]>>> = := 6
> [Stellar]>>> %vars
> 2 + 2 = 5 via 5
> test = 1 via 1
> = = 6 via 6
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)