Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Really fixing merge cleanup

  • Loading branch information...
commit 5f18d4d7e7d7fa512bc3f72071f1f126201b15ee 1 parent 10404e7
@hunner hunner authored
Showing with 0 additions and 55 deletions.
  1. +0 −55 ragel/mpf.rl
View
55 ragel/mpf.rl
@@ -8,7 +8,6 @@ require "awesome_print"
puts "OK"
}
-<<<<<<< HEAD
action mark {
@tokenstack.push(p)
#puts "Mark: #{self.line(string, p)}##{self.column(string, p)}"
@@ -102,41 +101,10 @@ require "awesome_print"
# Compute line and column of the cursor (p)
puts "Error at line #{self.line(string, p)}, column #{self.column(string, p)}: #{string[p .. -1].inspect}"
} ;
-=======
- ws = ([ \t\n])* ;
- arrow = "->" | "<-" | "~>" | "<~" ;
- uppercase_name = [A-Z][A-Za-z0-9:]* ;
- quoted_string = "\"" ( (any - "\"") | "\\" any)* "\"" |
- "'" ( (any - "'") | "\\" any)* "'" ;
- #naked_string = alnum+ ;
- naked_string = [A-Za-z0-9:+\-\[\]] ;
- string = quoted_string | naked_string ;
- type_name = [A-Za-z0-9_:]+ ;
- param_name = [A-Za-z0-9_]+ ;
- param_value = string ;
-
- parameter = param_name ws "=>" ws param_value
- parameters = parameter ( ws "," ws parameter )* ;
-
- reference = uppercase_name "[" string "]" ;
- edge = reference ws arrow ws reference ;
- name = [A-Za-z0-9]+ ;
-
- resource_entry = name ws ":" ws parameters ws ";" ;
- resource_entries = resource_entry ( ws resource_entry )* ;
-
- resource = type_name ws "{" ws resource_entries ws "}" > foo ;
- statement = (ws (resource | edge) )+ ;
-
- main := ( statement )
- 0 @{ puts "Failed" }
- $err { puts "Error" } ;
->>>>>>> cd844b7... - Add basics of an MPF ragel parser. Currently violates lak's mpf.bnf,
}%%
class MPF
attr_accessor :eof
-<<<<<<< HEAD
def initialize
# BEGIN RAGEL DATA
@@ -183,35 +151,12 @@ class MPF
def column(str, pos)
return str[0 .. pos].split("\n").last.length
-=======
- def parse(string)
- %% write data;
-
- data = string.unpack("c*")
-
- %% write init;
- %% write exec;
->>>>>>> cd844b7... - Add basics of an MPF ragel parser. Currently violates lak's mpf.bnf,
end
end # class MPF
def parse(string)
-<<<<<<< HEAD
puts "result %s" % MPF.new.parse(string)
end
parse(File.open(ARGV[0]).read)
-=======
- MPF.new.parse(string)
-end
-
-parse("
- foo {
- test:
- fizzle => 'bar';
- foo:
- bar => 'baz';
- }
-")
->>>>>>> cd844b7... - Add basics of an MPF ragel parser. Currently violates lak's mpf.bnf,
Please sign in to comment.
Something went wrong with that request. Please try again.