summaryrefslogtreecommitdiff
path: root/issues/50.txt
diff options
context:
space:
mode:
Diffstat (limited to 'issues/50.txt')
-rw-r--r--issues/50.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/issues/50.txt b/issues/50.txt
new file mode 100644
index 00000000..466cad49
--- /dev/null
+++ b/issues/50.txt
@@ -0,0 +1,56 @@
+Id: 50
+Subject: sending back artificicial tokens with ignore
+Tracker: Bug
+Status: Closed
+Fixed-Version:
+Created-On: Sat Mar 20 18:31:54 -0700 2010
+Updated-On: Sat Mar 20 21:57:25 -0700 2010
+
+Where does the ignore come from? The artificial token or from the the stream? Need to record this info and use it during backtracking
+
+<pre>
+lex start
+{
+ ignore /[ \t]+/
+ literal '*', '(', ')', '^', ';', '\n', '.'
+ token id /[a-zA-Z_]+/
+}
+
+parser out_parser [out]
+global out_parser Out = construct out_parser []
+
+def out_item
+ [id]
+| ['(' item* ')']
+
+def out
+ [out_item*]
+
+def item
+ [id]
+ {
+ Out << r1
+ }
+| ['(' item* ')']
+ {
+# Out << '('
+# Out << r2
+# Out << ')'
+ }
+
+def A1 []
+def A2 []
+
+def F
+ []
+ {
+ #Out.finish()
+ }
+
+def start
+ [A1 item* F '.' '^']
+| [A2 item* F '.' ';' '\n']
+
+start Input = parse start( stdin )
+print( Input )
+</pre>