{"action":"closed","issue":{"url":"https://api.github.com/repos/jmespath/jmespath.rb/issues/12","repository_url":"https://api.github.com/repos/jmespath/jmespath.rb","labels_url":"https://api.github.com/repos/jmespath/jmespath.rb/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/jmespath/jmespath.rb/issues/12/comments","events_url":"https://api.github.com/repos/jmespath/jmespath.rb/issues/12/events","html_url":"https://github.com/jmespath/jmespath.rb/issues/12","id":122520581,"number":12,"title":"Make dash a valid identifier","user":{"login":"dmoskalik","id":7963026,"avatar_url":"https://avatars.githubusercontent.com/u/7963026?v=3","gravatar_id":"","url":"https://api.github.com/users/dmoskalik","html_url":"https://github.com/dmoskalik","followers_url":"https://api.github.com/users/dmoskalik/followers","following_url":"https://api.github.com/users/dmoskalik/following{/other_user}","gists_url":"https://api.github.com/users/dmoskalik/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoskalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoskalik/subscriptions","organizations_url":"https://api.github.com/users/dmoskalik/orgs","repos_url":"https://api.github.com/users/dmoskalik/repos","events_url":"https://api.github.com/users/dmoskalik/events{/privacy}","received_events_url":"https://api.github.com/users/dmoskalik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jmespath/jmespath.rb/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-16T14:51:27Z","updated_at":"2016-03-31T05:42:34Z","closed_at":"2016-03-31T05:42:34Z","body":"Why isn't dash (\"-\") a valid identifier? For example I cannot get the data when I specify a filter like `sc_host_name.my-pc`\r\n\r\nMy json:\r\n```json\r\n{ \r\n  \"sc_host_name\":{\r\n    \"my-pc\":{\r\n      \"ip\":\"192.168.1.1\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nI get an error\r\n``` \r\n/usr/local/rvm/gems/ruby-2.2-head/gems/jmespath-1.1.3/lib/jmespath/parser.rb:41:in `parse': expected :eof got identifier (JMESPath::Errors::SyntaxError)\r\n        from /usr/local/rvm/gems/ruby-2.2-head/gems/jmespath-1.1.3/lib/jmespath/caching_parser.rb:25:in `block in cache_expression'\r\n        from /usr/local/rvm/gems/ruby-2.2-head/gems/jmespath-1.1.3/lib/jmespath/caching_parser.rb:23:in `synchronize'\r\n        from /usr/local/rvm/gems/ruby-2.2-head/gems/jmespath-1.1.3/lib/jmespath/caching_parser.rb:23:in `cache_expression'\r\n        from /usr/local/rvm/gems/ruby-2.2-head/gems/jmespath-1.1.3/lib/jmespath/caching_parser.rb:16:in `parse'\r\n        from /usr/local/rvm/gems/ruby-2.2-head/gems/jmespath-1.1.3/lib/jmespath/runtime.rb:51:in `search'\r\n        from /usr/local/rvm/gems/ruby-2.2-head/gems/jmespath-1.1.3/lib/jmespath.rb:33:in `search'\r\n```\r\n\r\nIf I add - to the `VALID_IDENTIFIERS` in `lexer.rb` it works like a charm."}}