cucumber-attic / gherkin2

A fast Gherkin parser in Ragel (The parser behind Cucumber)
MIT License
382 stars 221 forks source link

Getting Lexing Error #339

Closed qveera closed 8 years ago

qveera commented 8 years ago

All my feature files and step definitions worked fine till 5/10/15 morning, after rebooting my system, whenever i ran my feature file i am getting this error

ruby fruits.rb remote -f example_features/tone_generation.feature configs/arndale.yaml -a root@192.168.26.147 /home/vpraveen/unions/Fruits/Git/fruits/src/fruits_env_setup.rb:83: warning: Insecure world writable dir /opt in PATH, mode 040777 '. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information. (Gherkin::Lexer::LexingError) /var/lib/gems/1.9.1/gems/gherkin-2.12.2/lib/gherkin/lexer/i18n_lexer.rb:24:in scan' /var/lib/gems/1.9.1/gems/gherkin-2.12.2/lib/gherkin/lexer/i18n_lexer.rb:24:inscan' /var/lib/gems/1.9.1/gems/gherkin-2.12.2/lib/gherkin/parser/parser.rb:33:in parse' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/feature_file.rb:37:inparse' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/runtime/features_loader.rb:28:in block in load' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/runtime/features_loader.rb:26:ineach' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/runtime/features_loader.rb:26:in load' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/runtime/features_loader.rb:14:infeatures' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/runtime.rb:179:in features' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/runtime.rb:49:inrun!' /var/lib/gems/1.9.1/gems/cucumber-1.3.17/lib/cucumber/cli/main.rb:47:in execute!' fruits.rb:278:inrun' fruits.rb:287:in `

'

All this code worked fine before rebooting. I am suspecting something upgraded

aslakhellesoy commented 8 years ago

Please share a feature file that would allow us to reproduce this.

Also, can you try (temporarily) upgrading to Cucumber 2.1.0 and see if your problem goes away?

aslakhellesoy commented 8 years ago

Your command line looks very suspicious:

ruby fruits.rb remote -f example_features/tone_generation.feature configs/arndale.yaml -a 

Is that really your command?

qveera commented 8 years ago

this is my command

ruby fruits.rb remote -f example_features/tone_generation.feature configs/arndale.yaml -a \ root@192.168.26.147

qveera commented 8 years ago

Yaa. After upgrading Its Solved I think. But now I am getting errors like:

configs/arndale.yaml: Parser errors: (35:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Remote_TempDir: "/data/tmp/fruitsalad/"' (41:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'UsecasePath: "targets/arndale_linux_usecases"' (43:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'SaladMix_Location: "bin/arm-linux-gnueabihf-saladmix"' (45:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'SaladMix_Upload: true' (47:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Firmware_InstallPath: "/lib/firmware/"' (49:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Linux_ChipInfoAccess: WISCEBridge' (51:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Firmware_ids: {Ez2 Control: 4000d}' (52:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Firmware_names: {Ez2 Control: FIRMWARE_FLORIDA_EZ2CONTROL}' (53:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Firmware_tinymixNames: {Ez2 Control: Ez2Control, pass through: MBC/VSS}' (54:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Firmware_DSPControlAddresses: {DSP1: 1100, DSP2: 1200, DSP3: 1300, DSP4: 1400}' (55:1): expected: #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Firmware_DSPMemoryBaseAddresses: {' (Cucumber::Core::Gherkin::ParseError) /var/lib/gems/1.9.1/gems/cucumber-core-1.3.0/lib/cucumber/core/gherkin/parser.rb:34:in rescue in document' /var/lib/gems/1.9.1/gems/cucumber-core-1.3.0/lib/cucumber/core/gherkin/parser.rb:29:indocument' /var/lib/gems/1.9.1/gems/cucumber-core-1.3.0/lib/cucumber/core.rb:27:in block in parse' /var/lib/gems/1.9.1/gems/cucumber-core-1.3.0/lib/cucumber/core.rb:26:ineach' /var/lib/gems/1.9.1/gems/cucumber-core-1.3.0/lib/cucumber/core.rb:26:in parse' /var/lib/gems/1.9.1/gems/cucumber-core-1.3.0/lib/cucumber/core.rb:18:incompile' /var/lib/gems/1.9.1/gems/cucumber-2.1.0/lib/cucumber/runtime.rb:70:in run!' /var/lib/gems/1.9.1/gems/cucumber-2.1.0/lib/cucumber/cli/main.rb:32:inexecute!' fruits.rb:278:in run' fruits.rb:287:in

'

aslakhellesoy commented 8 years ago

You're telling cucumber to parse a YAML file apparently.