Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated some documentation

  • Loading branch information...
commit 27b8c4e13ecdac6cdc94a655b7ea6165915c97ae 1 parent 2552904
@mjackson authored
View
18 README
@@ -448,6 +448,24 @@ also be very helpful in keeping track of which offsets in the input generated
which matches.
+# Extras
+
+
+Several files are included in the Citrus repository that make it easier to work
+with grammar files in various editors.
+
+## TextMate
+
+To install the Citrus [TextMate](http://macromates.com/) bundle, simply
+double-click on the `Citrus.tmbundle` file in the `extras` directory.
+
+## Vim
+
+To install the [Vim](http://www.vim.org/) scripts, copy the files in
+`extras/vim` to a directory in Vim's
+[runtimepath](http://vimdoc.sourceforge.net/htmldoc/options.html#\'runtimepath\').
+
+
# Links
View
16 doc/extras.markdown
@@ -0,0 +1,16 @@
+# Extras
+
+
+Several files are included in the Citrus repository that make it easier to work
+with grammar files in various editors.
+
+## TextMate
+
+To install the Citrus [TextMate](http://macromates.com/) bundle, simply
+double-click on the `Citrus.tmbundle` file in the `extras` directory.
+
+## Vim
+
+To install the [Vim](http://www.vim.org/) scripts, copy the files in
+`extras/vim` to a directory in Vim's
+[runtimepath](http://vimdoc.sourceforge.net/htmldoc/options.html#\'runtimepath\').
View
4 examples/calc.citrus
@@ -5,7 +5,7 @@
# An identical grammar that is written using pure Ruby can be found in calc.rb.
grammar Calc
- ## Hierarchy
+ ## Hierarchical syntax
rule term
additive | factor
@@ -55,7 +55,7 @@ grammar Calc
(lparen term rparen) { term.value }
end
- ## Syntax
+ ## Lexical syntax
rule number
float | integer
View
4 examples/calc.rb
@@ -8,7 +8,7 @@
# found in calc.citrus.
grammar :Calc do
- ## Hierarchy
+ ## Hierarchical syntax
rule :term do
any(:additive, :factor)
@@ -58,7 +58,7 @@
all(:lparen, :term, :rparen) { term.value }
end
- ## Syntax
+ ## Lexical syntax
rule :number do
any(:float, :integer)
View
4 lib/citrus.rb
@@ -116,8 +116,8 @@ def initialize(string)
# The number of times the cache was hit. Only present if memoing is enabled.
attr_reader :cache_hits
- # Resets all internal variables so that this object may be used in
- # another parse.
+ # Resets all internal variables so that this object may be used in another
+ # parse.
def reset
super
@max_offset = 0
Please sign in to comment.
Something went wrong with that request. Please try again.