     text = @agda.editor.getText()
 
     tokens = new Lexer text
-      .lex commentRegex, 'comment'
-      .lex goalBracketRegex, 'goal bracket'
-      .lex goalQMRegex, 'goal QM'
+      .lex commentRegex, 'raw', 'comment'
+      .lex goalBracketRegex, 'raw', 'goal bracket'
+      .lex goalQuestionMarkGroupRegex, 'raw', 'goal ?s'
+      .lex goalQuestionMarkRegex, 'goal ?s', 'goal ?'
       .result
 
     # for counting goals

  findGoals: (text) ->

    tokens = new Lexer text
      .lex commentRegex, 'comment'
      .lex goalBracketRegex, 'goal bracket'
      .result

    # for counting character position

{Point, Range} = require 'atom'
Goal = require './goal'

commentRegex = /(--[^\r\n]*[\r\n])/
goalBracketRegex = /(\{![^!\}]*!\})/
goalQuestionMarkGroupRegex =
    /// (
        [\s\(\{\_\;\.\"@]\?
        (?:\s\?)*
        [\s\)\}\_\;\.\"@]
    )///
goalQuestionMarkRegex =
    /// ([\s\(\{\_\;\.\"@])(?=\?)
    |   (\?[\s\)\}\_\;\.\"@])
    ///

# manages all Goals in a editor
class GoalManager extends EventEmitter
