             nl    = ("\\r" / "\\n" / "\\u2028" / "\\u2029")
           ''', trackLineAndColumn: true
           
-          expect(parser.parse "1\n2\n\n3\n\n\n4 5 x").to.eql [7, 5]
+          expect(tryParse parser, "1\n2\n\n3\n\n\n4 5 x").to.eql [7, 5]
+
+      suite 'variable use in semantic not code', ->
+        test 'can use label variables', ->
+          parser = PEG.buildParser '''
+            start
+              = a:"a" !{return a isnt "a"}
+          '''
+          expect(tryParse parser, "a").to.eql ["a", ""]
+        
+        test 'can use the |offset| variable to get the current parse position', ->
+          parser = PEG.buildParser '''
+            start
+              = "a" !{return offset isnt 1}
+          '''
+          expect(tryParse parser, "a").to.eql ["a", ""]
+
+        test 'can use the |line| and |column| variables to get the current line and column', ->
+          parser = PEG.buildParser '''
+            {
+              global.result = "test"
+            }
+            start = line (nl+ line)* {return @result }
+            line  = thing (" "+ thing)*
+            thing = digit / mark
+            digit = [0-9]
+            mark  = !{ @result = [line, column]; return false } "x"
+            nl    = ("\\r" / "\\n" / "\\u2028" / "\\u2029")
+          ''', trackLineAndColumn: true
+          
+          expect(tryParse parser, "1\n2\n\n3\n\n\n4 5 x").to.eql [7, 5]
+
+

          start
            = "a" { return @val }
        '''
        expect(parser.parse "a").to.equal "2"

      suite 'predicates', ->
        test 'semantic not code', ->
          parser = PEG.buildParser '''
            start
              = !{return typeof Array is "undefined"}
          '''
          expect(parser.parse "").to.equal ""

        test 'semantic and code', ->
          parser = PEG.buildParser '''
            start
              = &{return typeof Array isnt "undefined"}
          '''
          expect(parser.parse "").to.equal ""


      suite 'variable use', ->

  expect = global.expect
  PEG = global.PEG
  PEGCoffee = global.PEGCoffee


# Helper functions
tryParse = (parser, text) ->
  try
    result = parser.parse(text)
  catch e
    result = e
  return result


# Test suite for the plugin  
